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.
