|
Definitely had to do with an event being
fired…but whats odd was there was still *some* reaction by the component…it just moved the items
to the root of the tree. Anyhow I reset the dataprovider after the XML model
was changed and it’s working just fine now. Perhaps a more elegant way to
accomplish this but after a couple hours of fiddling..I gotta move on. ;-) Thanks for the input! Stace From: Try running .updateControl() on the tree
in question and see if that helps with redrawing. I know that (apparently
undocumented) method worked for me in the MX04 v2 components. I found
that by digging through the MX04 v2 components source. My guess is it’ll probably work (at
least in 1.5 – 2.0 looks like it might be a big rewrite). Maybe someone else knows a better way to accomplish
that. Hope that helps/works, Jeff From: One step further…that code snippet *is* working…the dataprovider for the
tree is changed…the nodes *are*
removed…I believe it’s the tree component that’s not
refreshing properly. I’ve tried redraw and broadcasting modelChanged,
change events to no avail… -Stace From: Tried this variation, same
result…removes a folders child nodes but leaves the
folder…don’t get it !! var dp =
view.profileFields.dataProvider; for (var locNode :XMLNode = dp.firstChild;
locNode != null;) { var exclude :Boolean = false; if ( locNode.toString() ==
nodes[0].toString() ) {
trace("TRUE");
exclude = true; } var nextNode = locNode.nextSibling; if( exclude ) {
locNode.removeNode(); } locNode =
nextNode; } From:
YAHOO! GROUPS LINKS
|
- RE: [flexcoders] Can't Seem to removeNode properly from a Tre... Jeff Conrad
- RE: [flexcoders] Can't Seem to removeNode properly from ... Tracy Spratt
- RE: [flexcoders] Can't Seem to removeNode properly from ... Stacy Young
- RE: [flexcoders] Can't Seem to removeNode properly from ... Stacy Young

