2 Replies Latest reply on Oct 7, 2009 3:31 PM by timo888

    item.data deprecated?

    timo888

      Does the circled icon in the attached screen capture of the Flex 3 debugger indicate that the item.data property has been deprecated?

       

      On a PopupMenuButton using an ArrayCollection for the DataProvider, how do you access the value in item.data from inside the itemClick eventhandler?

       

      <mx:PopUpMenuButton id="mybutton" itemClick="onCharSelected(event);" x="159" y="-2" label="æ" width="41"  />

      .

      .

      .

      this.mybutton.dataProvider = chars;

       

      public var chars:ArrayCollection = new ArrayCollection(
                      [ {label:"ð", data:"ð"},
                        {label:"æ", data:"æ"},
                        {label:"þ", data:"þ"} ]);

       

       

      private function onCharSelected(e:MenuEvent):void {
                    
                    e.item.?

                    ArrayCollection (e.menu.dataProvider).list.getItemAt(e.index);  ??

                  // the "data" property of item seems inaccessible no matter how it's fetched.

                 
                  }