Results 1 to 6 of 6

Thread: Can't seem to get [RouteEvents] to work

  1. #1
    Join Date
    Aug 2006
    Posts
    8

    Default 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

  2. #2
    Join Date
    Dec 2008
    Location
    Brussels
    Posts
    407

    Default 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

  3. #3
    Join Date
    Feb 2009
    Posts
    6

    Default

    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

  4. #4
    Join Date
    Aug 2006
    Posts
    8

    Red face 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

  5. #5
    Join Date
    Dec 2008
    Location
    Brussels
    Posts
    407

    Default

    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

  6. #6
    Join Date
    Aug 2006
    Posts
    8

    Default

    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
  •