Closed dphfox closed 2 months ago
OnEvent "Activated" should always return the same special key. Ditto for OnChange, Out, and all other special key generation functions.
OnEvent "Activated"
OnChange
Out
This allows for easy passthrough with components:
print(props[OnEvent "Activated"]) -- valid
But disallows multiple of the same handler being added to instances:
scope:New "TextButton" { [OnEvent "Activated"] = ..., [OnEvent "Activated"] = ..., -- no longer valid }
However, there's little evidence that multiple handlers are used in practice. Should the problem arise, we can investigate alternate API surfaces similar to #137.
OnEvent "Activated"
should always return the same special key. Ditto forOnChange
,Out
, and all other special key generation functions.This allows for easy passthrough with components:
But disallows multiple of the same handler being added to instances:
However, there's little evidence that multiple handlers are used in practice. Should the problem arise, we can investigate alternate API surfaces similar to #137.