• Home
  • About Me
  • AIR Central
  • AS3 Libs
  • Books
  • Flex Central
  • Resources
  • The Guru's
  •  

    Cairngorm 2 (Flex 2 Beta 3)

    Steven and the Cairngorm team have released the newest version of Cairngorm for Flex 2 beta 3 and there are 2 key changes that will break your Cairngorm 2 alpha code.

    • The addCommand() method in the FrontController is now accepting a String with the *name* of the command, rather than a new instance of the command so your addCommand() method will now look like this:
    	     addCommand( MyController.EVENT_LOGIN,  LoginCommand );      ***CORRECT***
    
    	     while the previous version accepted an Object and looked like this:
    
    	     addCommand( MyController.EVENT_LOGIN,  new LoginCommand() );   ***INCORRECT***
    • The signatures of the onResult and onFault methods in the commands have also changed and should now look like this:

    public function onResult( event : ResultEvent=null): void       ***CORRECT***
    public function onFault( event : FaultEvent=null) : void
    while the previous version looked like this:
    public function onResult( event : ResultEvent): void     ***INCORRECT***

    public function onFault( event : FaultEvent) : void

    Just install the new swc in the user_classes folder and make these 2 small changes and you should be ready to compile.

    You can read more about Cairngorm here and download the latest version here.

    Leave a Reply