-
-
Notifications
You must be signed in to change notification settings - Fork 8
Callable
João Cardoso edited this page Dec 4, 2019
·
5 revisions
Callable is an abstract class which exposes methods for registering and firing custom frame events. Calls works much alike the native SetScript and GetScript methods, except multiple handlers are supported for a single event. Registered handlers are cleared on :Release
.
Callable also happens to be one of the most core classes of Sushi, and most other classes derive from it. Hence, many classes will display a list of call events in their documentation.
Name | Description |
---|---|
SetCall (event, handler) | Sets the widget's handler function for the event. |
GetCalls (event) | Returns the widget's handler functions for the event. |
FireCalls (event, ...) | Calls the widget's handler functions for the event with the given arguments. Generally, should only be called by the class implementation. |
someFrame:SetCall("OnTextChanged", function(self, text)
print("Text changed to:", text)
end)
someFrame:FireCalls("OnTextChanged", "Banana")
// Text changed to: Banana
This is the Sushi-3.1 wiki. Wiki Home