Jai’s Weblog – Tech, Security & Fun…

Tech, Security & Fun…

  • Jaibeer Malik

    Jaibeer Malik
  • View Jaibeer Malik's profile on LinkedIn
  • Subscribe

  • Feedburner

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 32 other followers

  • Archives

  • Categories

  • Stats

    • 412,782
  • Live Traffic

  • Advertisements

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.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: