0 Replies Latest reply on Oct 1, 2009 6:36 AM by timo888

    Bug report: .selectedIndex on RadioButtonMenuItem = -1


      Flex 3.


      When I click on my MainMenu items, sometimes the index value = -1.  Here's the mxml definition:


      <mx:MenuBar id="MainMenu" x="23" y="10" width="100%" labelField="@label"   itemClick="itemClickHandler(event);"      >
                  <menuitem label="Search Type">
                      <menuitem label="Standard"  type="radio" groupName="searchtypemenugroup"/>
                      <menuitem label="Proximity" type="radio" groupName="searchtypemenugroup"/>
                       <menuitem label="Phrase" type="radio" groupName="searchtypemenugroup"/>


      And here's the eventhandler:


        // Event handler for the MenuBar control's itemClick event.
                 private function itemClickHandler(e:MenuEvent):void {

                // I added the call to the garbage collector thinking the intermittent nature of the problem

                    // might have something to do with memory
                      if (e.index==-1) {                 
                          var i:int;
                      if ( e.index == 0) {
                      if ( (e.index==1) || (e.index==2)) {


      When I trace the program into the Adobe code where the radiobutton icon is toggled, selectedIndex in that toggle routine = -1 and the value of selectedIndex is being assigned there to index. Please see attached screenshots.




      P.S. I couldn't find a "proper" place to report this, so I'm reporting it here.