Why isn't there an event.type?
Posted: 03 Jan 2013, 02:41
It'd be nice to have an event.type implemented into the API so that we have a little more control and flexibility on how we manage our events...
For example, event.type = SFS2X.SFSEvent.CONNECTION.
I forward my events to an observer to be handled by the application... However, as it is now, I have to create a specific function for each SFS event, modify the event object to include it's type, and then forward it to my observer.
For example, event.type = SFS2X.SFSEvent.CONNECTION.
I forward my events to an observer to be handled by the application... However, as it is now, I have to create a specific function for each SFS event, modify the event object to include it's type, and then forward it to my observer.