0 Replies Latest reply on Jan 16, 2007 4:50 AM by mikecrowe

    Cairngorm event execute() called 2 times

    mikecrowe
      Hi folks,

      This is driving me nuts. Please help.

      My unit test program has this:
      quote:

      CairngormEventDispatcher.getInstance().addEventListener(Time2doControl.EVENT_CONTACTSAVES UCCESS, testContact2);
      CairngormEventDispatcher.getInstance().dispatchEvent(new ContactSaveEvent());


      Inside my ContactSaveEvent, I have:
      quote:

      trace("ContactSave Event");
      super( Time2doControl.EVENT_CONTACTSAVE,false,true );


      (note -- have tried with simply super( Time2doControl.EVENT_CONTACTSAVE); -- no diff)

      Then, inside my ContactSaveCommand, I have:
      quote:

      trace("Executing ContactSave Command");
      CairngormEventDispatcher.getInstance().dispatchEvent(new CairngormEvent(Time2doControl.EVENT_CONTACTSAVESUCCESS));



      Inside the execute() function of the command, I have this trace:
      quote:

      trace("Firing ContactSave execute");



      Here's what I'm getting in the trace:
      quote:


      Saving Contact
      ContactSave Event
      Executing ContactSave Command
      Firing Save Contact execute
      Executing ContactSave Command
      Firing Save Contact execute



      Am I missing something basic?

      (note: I've trimmed out a bunch of stuff to make this readable -- that could be the problem)

      TIA
      Mike