Thanks... I'll file one.

But... why is it failing? In my mind, this should delete the node <b/>
from <a> <b/> </a>.

Of course, I haven't notified the Collection that I've modified the
XML yet, and XML doesn't send notifications, so I'd have to put that
in manually to get the display to change.... But why should this fail?

In general, if I have a node of the a tree selected and pointed to by
selectedChild, how should I go about deleting it?
XMLListCollection.removeNodeAt doesn't seem to deal with it (I guess
it works on the underlying list elements). Related to this, the
selectedIndex isn't useful for addressing a subbranch. It seems to me
that the specialization of ListCollectionView to XMLListCollection
hasn't been thought through completely.

I'd be grateful for suggested work-arounds for editing trees.


--- In flexcoders@yahoogroups.com, "valdhor" <[EMAIL PROTECTED]> wrote:
>
> File a bug.
> 
> I can see why it is failing but it should not crash the browser.
> 
> 
> --- In flexcoders@yahoogroups.com, "shauncutts" <shaun@> wrote:
> >
> > The following code will crash Flash 9.0 r124 (debug version) when
> > built with flex builder 3.0: (flash running on either Firefox or
> > Safari, MacOS)
> > 
> > <?xml version="1.0" encoding="utf-8"?>
> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
> > layout="vertical"
> >     creationComplete="dotest();">
> >     
> >     <mx:XMLListCollection id="tree_collection">
> >         <mx:XMLList xmlns="">
> >             <a>
> >                 <b/>
> >             </a>
> >         </mx:XMLList>
> >     </mx:XMLListCollection>
> >     <mx:Script>
> >         <![CDATA[
> >             public function dotest(): void
> >             {
> >                 var data:XML = tree_collection[ 0 ];
> >                 data.setChildren( new XMLList() );
> >             }
> >                 
> >         ]]>
> >     </mx:Script>
> > </mx:Application>
> >
>


Reply via email to