Tips&Tricks: CairngormEventDispatcher dispatchEvent versus dispatch method
Posted by Jai on August 21, 2009
With Cairngorm versions prior up to and including 2.1, the sample code we usually find uses,
var loginEvent : CheckLoginCredentialsEvent = new CheckLoginCredentialsEvent ( username, password ); CairngormEventDispatcher.getInstance().dispatchEvent( loginEvent );
With Cairngorm 2.2, a helper method to CairngormEvent
new CheckLoginCredentialsEvent ( username, password ).dispatch();
Use whichever you like. I personally prefer the second one.