-
Aug 21st, 2010, 04:42 PM
#1
Can't seem to get [RouteEvents] to work
Using metadata [EventHandler] and [RouteEvents] it appearst that EventHandler is working but not RouteEvents.
In app context:
<object id="autowiringStageProcessor" class="org.springextensions.actionscript.stage.Def aultAutowiringStageProcessor"/>
<object id="eventHandlerProcessor" class="org.springextensions.actionscript.ioc.facto ry.config.EventHandlerMetaDataPostProcessor"/>
<object id="routeEventsProcessor" class="org.springextensions.actionscript.ioc.facto ry.config.RouteEventsMetaDataPostProcessor"/>
Compiler args:
-keep-as3-metadata+="EventHandler,RouteEvents,Autowired"
MXML metadata:
<mx:Metadata>
[RouteEvents("implicitSend")]
[Event("implicitSend")]
</mx:Metadata>
Clicking a button that dispatches "implicitSend". Unless I dispatch directly to the EventBus, event listeners do not get the event.
The fact the [EventHandler] seems to work for me makes me wonder what I am doing differently with [RouteEvents].
Thanks,
Todd Crone
Using FlexBuilder3, Flex SDK 3.5, MacOSX and 1.0RC1 for SpringActionScript.
- Todd
-
Aug 24th, 2010, 03:40 AM
#2
sample
Hey Tod,
at first glance your setup seems to be in order, could you perhaps post a small sample application that demonstrates the problem? That way we'll have a better chance to find out where the problem lies.
Thanks in advance,
Roland
-
Aug 24th, 2010, 09:33 AM
#3
I also have this issue with [RouteEvent]
but it is like the debug build works fine, however, the release swf doesn't seems to containn RouteEvent tag
-
Aug 25th, 2010, 02:00 PM
#4
Working if I explicitly put in ...(events="eventName")
So it works if I fully qualify the events as below:
[RouteEvents(events="currentJourneysLoaded,journeyS tarted")]
but the documentation implies that [RouteEvents] should route all events I believe.
Todd
- Todd
-
Aug 27th, 2010, 02:44 AM
#5
Hey Tod,
what if you change your event metadata like this:
[Event(name="implicitSend",type="flash.events.Event ")]
I just noticed that you use an implicit key in your code, which is not the regular way (check some of the Flex classes, they all fully qualify their Event metadata)
cheers,
Roland
-
Aug 27th, 2010, 09:42 AM
#6
Thanks Roland. I'll do that from now on. Just being lazy. Hopefully FlexBuilder will refactor these for me when I get fickle rename things.
- Todd
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules