At the moment, all event handlers in Inky are limited to having just one callback - calling on multiple times would just overwrite the previous one, and not add it alongside other callbacks, as on in other frameworks usually does.
This PR replaces all Callback fields with a Callbacks table. Each time on is called, the callback is inserted into the corresponding table - and whenever an event is raised, all callbacks in the table will be called.
At the moment, all event handlers in Inky are limited to having just one callback - calling
on
multiple times would just overwrite the previous one, and not add it alongside other callbacks, ason
in other frameworks usually does.This PR replaces all
Callback
fields with aCallbacks
table. Each timeon
is called, the callback is inserted into the corresponding table - and whenever an event is raised, all callbacks in the table will be called.