1 Reply Latest reply on Nov 8, 2007 8:42 AM by levancho

    Custom events and view states

    Anton_Katernoga
      Hi, need some help from the event guru.
      I have several view states, each of them contain custom component, which is subscribed to listen to my custom GenEvent.
      When I click the button and change the view state, the components on that state don't get the event!
      private function onSidesChange():void{
      switch(sides.value){
      case 1:
      currentState='';
      break;
      case 2:
      currentState="2sides";
      break;
      default:
      currentState="3sides";
      break;
      }
      dispatchEvent(new GenEvent(config,GenEvent.TYPE));
      }
      So, on page one (main state), I have 1 column of custom components, event works ok. The 2nd page (I add another column), the components on the second column don't get the event. I need to go back to page 1 or to go to p3 to make p2's components get the event.