Announcement Announcement Module
Collapse
No announcement yet.
EventHandler Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • EventHandler

    Somehow the EventHandler meta is not working (i didn't receive any message), but i do if i register via EventBus.addEventListener, i have the
    PHP Code:
    -keep-as3-metadata+=EventHandler,RouteEvents,Autowired 
    my function is
    PHP Code:
    [EventHandler("saveProgram")]
    public function 
    saveProgram(event:Event):void 
    i added the
    PHP Code:
    <object id="routeEventsProcessor" class="org.springextensions.actionscript.ioc.factory.config.RouteEventsMetaDataPostProcessor"/> 
    and i have instantiated my class via spring <object/> tag, still no working, there are no errors or anything just silence. What am i doing wrong?

    I'm using spring-actionscript-core-1.0RC1.swc.

  • #2
    wrong annotation

    Hey there,

    I think the problem is your annotation, it should be like this:

    [EventHandler(name="saveProgram")]

    The [EventHandler] doesn't recognize default arguments, that's why you explicitly have to add the 'name='.

    Hope that helps,

    cheers,

    Roland

    Comment


    • #3
      another mistake

      I see you're doing something else wrong as well

      As described in the docs:

      http://www.springactionscript.org/do...ta_annotations

      you need to add this postprocessor:

      Code:
      <object id="eventhandlerProcessor" class="org.springextensions.actionscript.ioc.factory.config.EventHandlerMetaDataPostProcessor"/>
      you're adding the RouteEventsMetaDataPostProcessor, which handles [RouteEvents] metadata.

      cheers,

      Roland

      Comment


      • #4
        [solved]

        Yeah! That was. My mistake, sorry for taking your precious time.

        Comment

        Working...
        X