pracro:devas_corner
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
pracro:devas_corner [2010/08/10 11:14] – deva | pracro:devas_corner [2010/08/10 11:15] – deva | ||
---|---|---|---|
Line 60: | Line 60: | ||
The return values will no longer be used. Instead widget methods will be added to control the validation state of each widget, eg. '' | The return values will no longer be used. Instead widget methods will be added to control the validation state of each widget, eg. '' | ||
Since it is no longer required (due to redundancy) the '' | Since it is no longer required (due to redundancy) the '' | ||
+ | |||
====Event Handlers==== | ====Event Handlers==== | ||
* '' | * '' | ||
- | * '' | + | * more to come |
- | * and many more | + | |
====The Widget Object==== | ====The Widget Object==== | ||
When in a lua function, invoked by an event handler, the calling object (the object invoking the event) will be made available through the value ' | When in a lua function, invoked by an event handler, the calling object (the object invoking the event) will be made available through the value ' | ||
- | Other object can be retrieved using the '' | + | Other object can be retrieved using the '' |
<code lua> | <code lua> | ||
function foo() | function foo() | ||
- | if (this.value == ' | + | if (this:value() == ' |
then | then | ||
- | this.setValue(' | + | this:setValue(' |
end | end | ||
- | bas = getWidget(' | + | bas = widget(' |
- | if (bas && bas.value == ' | + | if (bas && bas:value() == ' |
then | then | ||
- | bas.setValue(' | + | bas:setValue(' |
end | end | ||
end | end |
pracro/devas_corner.txt · Last modified: 2011/01/14 14:49 by deva