while learning about how to dispatch a customized event i have found that following two methods are mentioned for dispatching event. these are:
dispatchevent which require an event object to be passed in it and the receiver needs to register for this event by using add listener methods. this methodology an event object model. however i also have found that
AppEvent.dispatch is also used for dispatching event, this is based on the event bus architecture.however this methods needs to import com.esri.viewer.AppEvent
I am confused which one is the right method to use for dispatching a customized event for message communication.
any suggestion is appreciated.
regards
dispatchevent which require an event object to be passed in it and the receiver needs to register for this event by using add listener methods. this methodology an event object model. however i also have found that
AppEvent.dispatch is also used for dispatching event, this is based on the event bus architecture.however this methods needs to import com.esri.viewer.AppEvent
I am confused which one is the right method to use for dispatching a customized event for message communication.
any suggestion is appreciated.
regards