Hi All,
I've been scouring the forums for quite a while and can't seem to find what I am looking for. I have a main application SWF that is running in AIR and has a module that it loads using:
<mx:ModuleLoader id="modLoader" width="100%" height="100%" applicationDomain="{ApplicationDomain.currentDomai n}" creationComplete="loadModule();"/>
In the loadModule function, everything loads correctly and functions.
Both the main project and module have the following compiler directive:
-keep-as3-metadata+=EventHandler
Also, in the application context file, I have:
<object id="eventhandlerProcessor" class="org.springextensions.actionscript.ioc.facto ry.config.EventHandlerMetaDataPostProcessor"/>
In the module, however, I am throwing a custom exception:
EventBus.dispatchEvent(new DeleteMedicationRow("deleteMedicationRow",data as MedicationModel));
In am MXML class in the module, I have:
[EventHandler(name="deleteMedicationRow")]
private function deleteMedicationRow(event:Event):void ...
This never gets fired. I can do:
EventBus.addEventListener("deleteMedicationRow",de leteMedicationRow);
but not the annotations version. I've tried all sorts of permutations for the annotation and the function signature, but nothing seems to work. Is there something else that I need to do in order to get the annotations to work?
The module does not load it's own application context, like other forum members are doing. As far as I understand, it does not need to do that.
Any thoughts would be appreciated. I can certainly use the brute force method, but I'd like to use the annotations given the simplicity of the code.
Thanks,
Tom


Reply With Quote