Title: a problem with 0.7.3 moxie Post by: spacetimer on July 20, 2010, 08:19:25 I'm working under flex3
In the simple_routing example I want to apply the two kinds of reaction syntax and remove the mediator's 'onRegister' function in which it adds listeners for compent's events. For example I altered simplemodule.view.MessageNavBarMediator as follows: step1: //adding: public function reactToMessageShellButtonClick(event:MouseEvent):void { Alert.show('hi from 0.7.3'); } or : public function reactToMessageShellButton$Click(event:MouseEvent):void { Alert.show('hi from 0.7.3'); } step2: //deleted: /* override public function onRegister():void { messageShellButton.addEventListener(FlexEvent.BUTTON_DOWN, messageShellButtonListener); messageModulesButton.addEventListener(FlexEvent.BUTTON_DOWN, messageModulesButtonListener); messageGroupButton.addEventListener(FlexEvent.BUTTON_DOWN, messageGroupButtonListener); messageInstancesInGroupButton.addEventListener(FlexEvent.BUTTON_DOWN, messageInstanceGroupButtonListener); } */ or: //remained, but add 'super.onRegister()' to support reaction syntax override public function onRegister():void { super.onRegister(); messageShellButton.addEventListener(FlexEvent.BUTTON_DOWN, messageShellButtonListener); messageModulesButton.addEventListener(FlexEvent.BUTTON_DOWN, messageModulesButtonListener); messageGroupButton.addEventListener(FlexEvent.BUTTON_DOWN, messageGroupButtonListener); messageInstancesInGroupButton.addEventListener(FlexEvent.BUTTON_DOWN, messageInstanceGroupButtonListener); } This works fine with 0.6-flex But It doesn't work when I replaced it with 0.7.3-flex-moxie and changed the app tag to <fab:FlexHaloApplication>. An error was thrown: Error: A class with the name 'simplemodule.view::MessageNavBarMediator' could not be found. at org.as3commons::ClassUtils$/forName()[/Users/sema/Work/projects/personal/development/PureMVCFabricationIoC/as3-commons-reflect/org/as3commons/ClassUtils.as:83] at org.as3commons::ClassUtils$/forInstance()[/Users/sema/Work/projects/personal/development/PureMVCFabricationIoC/as3-commons-reflect/org/as3commons/ClassUtils.as:50] at org.as3commons.reflect::Type$/forInstance()[/Users/sema/Work/projects/personal/development/PureMVCFabricationIoC/as3-commons-reflect/org/as3commons/reflect/Type.as:77] ... Am I missing some steps here switching 0.6-flex app to 0.7.3-flex-moxie app? And also I find that simply adding 'super.onRegister()' in the mediator's 'onRegister()' function will cause the same error with 0.7.3. However these modifications are OK with mediators in the shell.view package. So I suppose maybe some error occured during the module loading process. Thank you for you time. :) Title: Re: a problem with 0.7.3 moxie Post by: rafal.szemraj on July 20, 2010, 01:41:03 Hi spacetimer,
Thanks for this post, you've pointed out very important issue. The problems is in new reflection mechanism ( which not exists in 0.6 ). REflection mechanism can't find loaded module-related classes because they are held in separate domain. I will fix it and let you know. Thanks again! Title: Re: a problem with 0.7.3 moxie Post by: rafal.szemraj on July 21, 2010, 12:08:07 Hi,
try update ( 0.7.3.1 ) on project page. I've tested it on the same example you did and no errors at this point. Hope will work for you! Title: Re: a problem with 0.7.3 moxie Post by: spacetimer on July 21, 2010, 01:41:05 Yes no problem now. enjoyful!
|