ThisWidget | |||||||
Type | expression | ||||||
Dictionary | LCB | ||||||
Library | LiveCode Builder | ||||||
Syntax |
| ||||||
Associations | com.livecode.widget | ||||||
Summary | Returns the current widget. | ||||||
Example |
| ||||||
Values |
| ||||||
Description | This widget evaluates to the current widget. This can be used to retain a reference for occasions where widget handlers may be called from another module, where the current widget may not be valid. This is useful when LCB handlers within a widget module are used as asynchronous callback functions passed to foreign functions, as these may be called at a time when the widget is not the currently active widget. Using the reference prevents updates being seen as coming from the wrong widget. | ||||||
Tags | widget |