PureMVC Architects Lounge

PureMVC Manifold => Standard Version => Topic started by: Jigz on September 03, 2009, 10:42:12 PM



Title: Problem with MacroCommand
Post by: Jigz on September 03, 2009, 10:42:12 PM
Hi, i just like to ask you how to use the macro command in as2..
i have problems in overriding:
   protected function initializeMacroCommand():void
   {
   }
i dont know how to override this function in as2.
if use override a syntax error shows up..
please need help..
maybe a sample code of macro command will do thanks..


Title: Re: Problem with MacroCommand
Post by: Tekool on September 04, 2009, 12:25:46 AM
While having a quick overview of the MacroCommand class in AS2 (http://trac.puremvc.org/PureMVC_AS2/browser/tags/1.0/org/puremvc/as2/patterns/command/MacroCommand.as), there seems to be errors in it.

initializeMacroCommand and addSubCommand must be public, as protected doesn't exists in AS2. You'll have to modify it by yourself and ask the author (Pedr Browne <pedr.browne[A]puremvc.org>) of this port to correct the errors ASAP.


Title: Re: Problem with MacroCommand
Post by: puremvc on September 04, 2009, 06:50:08 AM
And to the addSubCommand method we should be passing command class reference not an instance of a class.

-=Cliff>