You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating event handling I often had a class like: addTypeofEventHandler and a removeTypeofEventHandler and handlers may have labels/names to them that had to be passed.
More common in JS , (and later in development) the "remove" function is returned as part of the creation:
This is a cleaner and more expected method and I think the way to go.
Another issue is the usage of "on" as in "onXYZ" vs "addXYZHandler" this is mostly a semantic issue.
Lastly, some functions, like "action" functions on the characterController class, are filter functions. The controller fires MANY actions, and it would be annoying to add handlers for every type.
Instead it uses the pattern onAction('actionLabel', handler) with the return being the remover.
The text was updated successfully, but these errors were encountered:
When creating event handling I often had a class like:
addTypeofEventHandler
and aremoveTypeofEventHandler
and handlers may have labels/names to them that had to be passed.More common in JS , (and later in development) the "remove" function is returned as part of the creation:
This is a cleaner and more expected method and I think the way to go.
Another issue is the usage of "on" as in "onXYZ" vs "addXYZHandler" this is mostly a semantic issue.
Lastly, some functions, like "action" functions on the characterController class, are filter functions. The controller fires MANY actions, and it would be annoying to add handlers for every type.
Instead it uses the pattern
onAction('actionLabel', handler)
with the return being the remover.The text was updated successfully, but these errors were encountered: