LaKraven / LKSL

LaKraven Studios Standard Library
http://otapi.com
Other
51 stars 15 forks source link

Add Event Listener support for creating Listeners on the UI Thread #106

Closed LaKraven closed 6 years ago

LaKraven commented 9 years ago

At present, the Event Engine requires that all Listeners be created as children of a TLKEventThread.

This leaves the implementing developer to define a TLKEventThread to dictate how best to update elements on their UI in a thread-safe way.

However, there is a reasonable solution which can enable an implementing developer to simply create a TLKEventListener without defining a TLKEventThread instance, and for that Listener's callback to be executed on the UI thread.

This should be introduced as it is going to be very useful for producing UI-specific Event Consumers without the need to have a companion Thread (if the implementing developer does not wish for one).