Prev | Current Page 499 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"


The BASE_DIR variable is used to set the root location of the templates. All the templates must be
included in this directory and will be reachable using their relative path to the base directory as the
Loader constructor argument.
Loader.BASE_DIR = ???d:\\templates\\???;
??‘
??‘
Part II: Server Side, JavaScript, and Flash; Oh My!
260
The TMP_DIR variable is used to store the compiled templates. If the templates are compiled at run time,
you must be sure that the directory has the correct writing permissions or an exception will be thrown.
Loader.TMP_DIR = ???d:\\compiled\\???;
Macros work a little differently from what you have already seen for the Template system and you can
set the MACROS static variable to null in order to not use them at all. Later in this chapter they will be
explained in detail.
Loader.MACROS = null;
If the OPTIMIZED variable is set to false, the templates are compiled on the very first request and every
time they are modified thereafter; otherwise the system will assume that the template has already been
compiled and is ready to be used and no check will be performed.


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