Or wrap the XMLList in an XMLListCollection: Var xlcMenuOptionsData:XMLListCollection = new XMLListCollection(menuOptionsData);
xlcMenuOptionsData .removeItemAt(1); As I recll, this will not work: var xmlNode:XML = menuOptionsData[1]; delete xmlNode; //gives ""cannot delete declared member..." error Tracy ________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Michael Schmalle Sent: Tuesday, May 01, 2007 11:29 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Remove Row from XMLList Good news / Bad news Hmm. Since you are accessing a dataProvider, try; // do whatever remove var p:ICollectionView = ICollectionView (myPopUpButton.dataProvider); p.refresh(); I think delete doesn't trigger a refresh. There is a way to interface with your dataProvider's ICollectionView that should, once the method like remove() is called automatically refresh the view as well. Peace, Mike On 5/1/07, boy_trike <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > wrote: Good News: the Delete DOES remove it from the XMLList. Bad News: This xml list is used as the data provider for a popupMenuButton and the options are still there in the list when I click on the button. Should I be removing the data from the popupMenuButton directly? or is there a way to refresh the button display? thanks Bruce --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "Michael Schmalle" <[EMAIL PROTECTED]> wrote: > > Try; > > menuOptionsData[1] = null; > > Or > > delete menuOptionsData[1]; > > Peace, Mike > > On 5/1/07, boy_trike <[EMAIL PROTECTED]> wrote: > > > > I have an XMLList that controls the options a user can get to. It looks > > like the following: > > > > <mx:XMLList id="menuOptionsData"> > > <menu label="Sales" data="S" url="/lumber/Sales" /> > > <menu label="Purchasing" data="P" url="/po/po" /> > > <menu label="Logistics" data="L" url="/logistics/lo" /> > > </mx:XMLList> > > > > I want to REMOVE the purchasing line. Can someone help me with the syntax. > > (I was hoping > > for something like "menuOptionsData[1].delete !". > > > > Thanks > > Bruce > > > > > > > > > > -- > Teoti Graphix > http://www.teotigraphix.com <http://www.teotigraphix.com> > > Blog - Flex2Components > http://www.flex2components.com <http://www.flex2components.com> > > You can find more by solving the problem then by 'asking the question'. > -- Teoti Graphix http://www.teotigraphix.com <http://www.teotigraphix.com> Blog - Flex2Components http://www.flex2components.com <http://www.flex2components.com> You can find more by solving the problem then by 'asking the question'.