Announcement Announcement Module
Collapse
No announcement yet.
Can't seem to get [RouteEvents] to work Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

  • #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

    Comment


    • #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

      Comment


      • #4
        Working if I explicitly put in ...(events=&quot;eventName&quot

        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

        Comment


        • #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

          Comment


          • #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.

            Comment

            Working...
            X