Dispatching Events with Cairngorm 2.2.1
While trawling through the CairngormEvent.as I noticed the distpatch() method which in essence calls the same code that was needed in the previous versions of Cairngorm.
Pre Cairngorm 2.2 example
2var event : LoginChangeEvent = new LoginChangeEvent(LoginChangeEvent.LOGOUT_EVENT,userVO);
3
4/* dispatch the event */
5CairngormEventDispatcher.getInstance().dispatchEvent( event );
Latest example
2var event : LoginChangeEvent = new LoginChangeEvent(LoginChangeEvent.LOGOUT_EVENT,userVO);
3
4/* dispatch the event */
5event.dispatch();
It just saves having to import the CairngormEventDispatcher and typing those extra characters. Which can save a lot of time if you're a chicken pecker typist :)

There are no comments for this entry.
[Add Comment] [Subscribe to Comments]