Prev | Current Page 473 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"


The src directory also contains the Page.hx file that includes the definition for the abstract class
Page , the PageView.hx , and the PageEdit.hx files contain homonymous class definitions. The hard
work is done in the Page class while the other two just add some specialization for the viewing and
editing context. The page constructor contains an array of links that will be displayed in the header section
of the page. The existing value can be modified at will and new ones can be added to fit the site needs.
The render method just assembles the output from other renderX methods. Those methods have been
left separated so that the derived classes may override them individually, avoiding code duplication.
class Page
{
private static var WIKI_HOME_PAGE = ???Wiki - Home Page??™;
private static var LOGO_PATH = ???/assets/logo.png??™;
private static var LOGO_ALT = ???logo wiki??™;
private static var BREADCRUMBS_TEXT = ???Where am I???™;
var controller : WikiController;
var altcontent : String;
var mainlinks : Array < LinkItem > ;
private function new(controller : WikiController, altcontent : String)
(continued)
246
Part II: Server Side, JavaScript, and Flash; Oh My!
{
this.


Pages:
461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485