Tree formats its drag and drop items as “treeItems” instead of “items” which is what the other list-based controls use. So try:

 

private function doDragDrop(event:DragEvent):void {       
            var dropTarget:Tree=Tree(event.currentTarget);           
            doDragExit(event);
            var items:Array =event.dragSource.dataForFormat("treeItems") as Array;
            Alert.show(items.length.toString());
        }
 

 


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jesús Iglesias
Sent: Monday, November 06, 2006 3:08 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] help moving elements in a tree

 

Hi,

 

I have a tree where I can move elements from one node to another. I have enabled drag and drop and all works fine. The last step is I need to know some details about destination. I created a doDrgagDrop function as on doc,

 

 dragEnabled="true"
 dropEnabled="true"
 dragMoveEnabled="true"
 dragEnter="doDragEnter(event);"
 dragExit="doDragExit(event);"
 dragOver="doDragOver(event);"
 dragDrop="doDragDrop(event);"

where:

 

        private function doDragDrop(event:DragEvent):void {       
            var dropTarget:Tree=Tree(event.currentTarget);           
            doDragExit(event);
            var items:Array =event.dragSource.dataForFormat("items") as Array;
            Alert.show(items.length.toString());
        }
 

 

But I get an error accesing a null object.

 

I supose after moving the element I could find the parent node in order to update database which this movement, but I need to know son info about moved element.

 

Please help!!

 

Thanks,

Jesus

 

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to