Prev | Current Page 498 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

To conclude, click OK on each of the opened windows. Also the Neko executable
must be accessible, but this is normally done during the haXe/Neko installation.
In Linux/Mac OS X you can copy or symlink the executable in an accessible folder ( BIN_PATH ).
The preceding step is not necessary if you do not mean to use the temploc executable to manually
compile your templates or if you do not want to use the Loader class to execute them.
Using Templo
The Templo system is composed by a bunch of classes but the one that is really needed to load and
execute the templates is the Template class. The class constructor accepts the template filename as an
argument and its execute() method works as in the haxe.Template system accepting a data object,
also known as context , that is used as a feed to replace the template expressions. Before instantiating the
Template class, the following static variables from the Loader class, must be set properly. As its name
implies, the Loader class has the responsibility of loading and managing the template files.


Pages:
486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510