OpenLaszlo allows a program to be divided into smaller files for the sake of modularity. It achieves this by introducing the include tag. The resource that is to be included in another file must have the library tag as its topmost tag. For example, the code in Listing 1.5 includes the code in Listing 1.6.
<canvas height="100"> <include href="include.lzx"/> </canvas> |
<library> <radiogroup> <radiobutton text="New York"/> <radiobutton text="Chicago"/> <radiobutton text="Seattle"/> </radiogroup> </library> |
It is effectively the same as the following code:
<canvas height="100"> <radiogroup> <radiobutton text="New York"/> <radiobutton text="Chicago"/> <radiobutton text="Seattle"/> </radiogroup> </canvas>
Note that changes to an include file will be reflected the next time the LZX application is invoked.