ScriptObject is an abstract UI type that provides support for scripts, such as OnLoad
, OnEvent
and OnFinished
. Scripts can be set to trigger in response to some widget event, or as a result of user interaction. The specific scripts that are supported vary wildly from object to object, but all objects support setting, hooking and getting of object scripts.
Defined Methods
- handler = ScriptObject:GetScript("scriptType") - Returns the widget's handler function for a script
- hasScript = ScriptObject:HasScript("scriptType") - Returns whether the widget supports a script handler
- ScriptObject:HookScript("scriptType", handler) - Securely hooks a script handler
- ScriptObject:SetScript("scriptType", handler) - Sets the widget's handler function for a script