class
tag. It ensures that
the class is instantiated in lexical order with surrounding nodes
The class
tag defines a new tag, which be used
anywhere in the source file where a built-in tag such as
view
or layout
can be used.
Defines a new XML tag name, that can be used in the remainder of the application source. An element whose name is this tag name will inherit the attributes and content of this definition.
For example,
<class name="mywindow" extends="window" layout="y" title="My Class"> <text>my class</text> </class>
defines a new tag named mywindow
. This tag can be used anywhere that window
is used.
<mywindow x="10"> <button>Click</button> </mywindow>
is equivalent to
<window layout="y" title="My Class"> <text>my class</text> <button>Click</button> </window>
Class definitions must precede view definitions that use the name of the class. An application can use a tag that is defined in a library, if the library is included before the point where the tag is used.
For an introduction to classes in LZX, see the Classes tutorial. For a concise explanation of classes in LZX, see the Classes chapter in the Guide. For advanced topics see the Extending Classes chapter.
Copyright © 2002-2007 Laszlo Systems, Inc. All Rights Reserved. Unauthorized use, duplication or distribution is strictly prohibited. This is the proprietary information of Laszlo Systems, Inc. Use is subject to license terms.