Object variables
Object variables can be created on the fly and attached to any object simply by adding an underscore to the beginning of any object tag parameter. Object variables can only be passed to an action.
Prior to executing any action all object variables are evaluated for the action's object target and replaced. It is important to note that the system is ambiguous when replacing object variables it finds, meaning that when an underscore is grouped with a named object variable, it will be replaced regardless of its intentions in the action.
Object variables can be modified using the <set> action.
Requirements
Custom attributes can be used on any object.
Sample code
<main> <panel name="panel" width="10 height="10" _message="Hello World!" onclick="display"></panel> </main> <actions> <action name="display"> <alert message="_message"/> </action> <actions>
Note:Notice the object variable named "_message" in the above sample.
Loading...
There was a problem loading this topic