[flexcoders] Tree drag-drop function
hello all, there is one single tree component in my application. XML is dataprovider of that tree. e.g node name=Cars id=1 isparent=true node name=Audi id=2 isparent=true node name=A4 id=3 isparent=false/ node name=A6 id=4 isparent=false/ /node node name=Mercedes id=5 isparent=true node name=M-Class id=6 isparent=false/ node name=R-Class id=7 isparent=false/ /node /node when i drag one node and drop to another node, how can i know the xml value of both source destination node? e.g we are Dragging 'R-Class' node to 'Audi' node, on dragComplete OR dragDrop event, how to get R-Class node id 7 Audi node id 2 in different variables. So we can check some validation of node and perform drag-drop operation. Any idea? Steve Roger.
Re: [flexcoders] Tree - Drag Drop - prevent drop into folder
Manohar,, thank you for your insights.. i tried it but didn't work for me.. so i used this one and it worked. http://life.neophi.com/danielr/2007/05/mx_internal.html what Manohar is trying to imply here is use _dropData. i am currently working on a project where i have to detect the parent where a new node in the tree will reside. So i use _dropData, which tells me who the parent is. Based on that i can allow or disallow dropping the dragged item inside the parent... But your input was what i was looking for, other than that. I am set and ready to prevent the event when dragDrop takes place.. I am planning to later explain in more detail.. -- View this message in context: http://www.nabble.com/Tree---Drag-Drop---prevent-drop-into-folder-tp17304720p19414819.html Sent from the FlexCoders mailing list archive at Nabble.com.
Re: [flexcoders] Tree - Drag Drop - prevent drop into folder
fyi if you are looking for more information on dropTarget (in other words, the mx_internal variable _dropData), you could access it using namespace 'mx_internal'. for e.g., say I have a tree mx:Tree id=tree ..blah.. / _dropData could be accessed as - var ns:Namespace = mx_internal; var dropData:Object = tree::ns._dropData; -manohar iilsley-2 wrote: It does not appear to be 'exposed' in Flex 3 sdk - released build. --- In flexcoders@yahoogroups.com, Andriy Panas [EMAIL PROTECTED] wrote: FYI, iilsley, back in November 2006, Adobe Flex SDK Engineer Deepa Subramaniam had made a promise on Flexcoders mailing list that the access to Tree's property _dropData declared as 'mx_internal' in Flex 2.0.1 SDK will be upgraded to public in Flex 3 SDK release: http://www.mail-archive.com/flexcoders@yahoogroups.com/msg46023.html I am currently on Flex 2.0.1 SDK, can you check for me whether the access to _dropData was upgraded to public in Flex 3 SDK? -- -- Med venlig hilsen / Best regards Andriy Panas [EMAIL PROTECTED] On 21/05/2008, Andriy Panas [EMAIL PROTECTED] wrote: Good idea iilsley with demanding more cleaner API for the Tree component to expose the dropTarget during drag and drop operations. I've started today a new thread on Flexcoders, you may be interested to read it too: http://tech.groups.yahoo.com/group/flexcoders/message/113475 Thanks for the info .. I may log a feature request for the Tree control to expose more information about the dropTarget . -- -- Med venlig hilsen / Best regards Andriy Panas [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Tree---Drag-Drop---prevent-drop-into-folder-tp17304720p17656503.html Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] Tree - Drag Drop - prevent drop into folder
I'm trying to prevent the 'drop' of a 'dragged' folder into an open folder but having no luck . I've looked @ the 'Spring Loaded Folders' http://www.flexibleexperiments.com/Flex/SpringLoadedFolders2/Sample.html which is almost there , but it still allows the drop if you position the source at the end of the 'drop folder' . Is there a way to get the 'parent' folder of the drop target ?
RE: [flexcoders] Tree - Drag Drop - prevent drop into folder
Anywhere in an open folder (like its children) or just the open folder row? If you look at the Tree source you can see how to get parents of things that are visible, and you might be able to use that to call preventDefault on the drag event. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of iilsley Sent: Sunday, May 18, 2008 9:20 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Tree - Drag Drop - prevent drop into folder I'm trying to prevent the 'drop' of a 'dragged' folder into an open folder but having no luck . I've looked @ the 'Spring Loaded Folders' http://www.flexibleexperiments.com/Flex/SpringLoadedFolders2/Sample.html http://www.flexibleexperiments.com/Flex/SpringLoadedFolders2/Sample.htm l which is almost there , but it still allows the drop if you position the source at the end of the 'drop folder' . Is there a way to get the 'parent' folder of the drop target ?
AW: [flexcoders] Tree drag drop
I have had the same problem, but didn't find a solution. Moreover, I tried to look at existing UIs (windows, java, .net and such frameworks and programs), but I could not find an implementation of a tree that support that. Do you know of such a program where I can look at that behaviour? My solution will be that depending on the mouse position (x value center of tree) to add the dropped item as a child of that item, otherwise as a sibling. Of course, the handling of the drop must be done manually. I've done work so far so that I can copy items; which was quite horrible for me, as I didn't find out how to easily update the model after the drop. Somehow I made it work. Now I want to make this reusable some how, but didn't figure out how exactly I should approach this. Markus Von: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von hank williams Gesendet: Mittwoch, 06. Dezember 2006 21:55 An: flexcoders@yahoogroups.com Betreff: [flexcoders] Tree drag drop with dragEnabled, dropEnabled, dragMoveEnabled all set to true I am able to drag an Item from one place in a tree to another. The only problem is that I dont seem to be able to promote or demote an item. meaning I can drag an item to a sibling position of another item, but not to a child of another item. Is this just a limitation of the tree control code or am I missing something. Hank
Re: [flexcoders] Tree drag drop
i havent looked for any code to do this, but all outliners do it, including the one in ms word. I really dont understand how dragging stuff around is useful if you cant change parent/child relationships. your strategy makes sense to me. The key thing is feedback, so you can see where its going to go when you release the mouse. I'm just getting into drag and drop so I dont know much about the mechanics or internals of how you make this stuff work. Regards, Hank On 12/7/06, Essl, Markus [EMAIL PROTECTED] wrote: I have had the same problem, but didn't find a solution. Moreover, I tried to look at existing UIs (windows, java, .net and such frameworks and programs), but I could not find an implementation of a tree that support that. Do you know of such a program where I can look at that behaviour? My solution will be that depending on the mouse position (x value center of tree) to add the dropped item as a child of that item, otherwise as a sibling. Of course, the handling of the drop must be done manually. I've done work so far so that I can copy items; which was quite horrible for me, as I didn't find out how to easily update the model after the drop. Somehow I made it work. Now I want to make this reusable some how, but didn't figure out how exactly I should approach this. Markus Von: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von hank williams Gesendet: Mittwoch, 06. Dezember 2006 21:55 An: flexcoders@yahoogroups.com Betreff: [flexcoders] Tree drag drop with dragEnabled, dropEnabled, dragMoveEnabled all set to true I am able to drag an Item from one place in a tree to another. The only problem is that I dont seem to be able to promote or demote an item. meaning I can drag an item to a sibling position of another item, but not to a child of another item. Is this just a limitation of the tree control code or am I missing something. Hank -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links
[flexcoders] Tree drag drop
with dragEnabled, dropEnabled, dragMoveEnabled all set to true I am able to drag an Item from one place in a tree to another. The only problem is that I dont seem to be able to promote or demote an item. meaning I can drag an item to a sibling position of another item, but not to a child of another item. Is this just a limitation of the tree control code or am I missing something. Hank
[flexcoders] tree drag drop
I think this should be a simple thing to do, but I haven't been able to figure out the answer. I have a really simple tree with an array collection as a data provider. mx:Tree id="fundTree" dataProvider="{fundList}" labelField="fundShortName" dragEnabled="true" dragMoveEnabled="true" dropEnabled="true" dragDrop="onDragDrop(event);" /mx:Tree If the user wants to move an element up or down the tree, I can see where to remove the item from the array collection, but I don't know where to add it to. How do I figure out the drop location? __._,_.___ -- 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 Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. __,_._,___
[flexcoders] Tree drag drop: how to get node where item is dropped
Hi, I have a tree with drag drop enabled. Now what is the best way to find out where the current selected item is dropped? Id need to know its parent (if its not on the rootnode), and the position where its dropped inside that parent. Or is there an easier way to find the position? Like comparing the dataproviders before after? Thanks for the tips, Jonas __._,_.___ -- 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 Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. __,_._,___
[flexcoders] Tree Drag Drop Blues ... Bug Report
Hi Adobe Engineers, I am working quite a lot with the tree control. The problem I am having is that when a node is draged from a tree to another tree, the dropped on tree doesn't allow dropping on its first node (all other nodes after the first node works fine). Another bug is that dragging from a tree to a datagrid doesn't work. The App I am working on depends heavily on drag and drop of tree to tree. Is there a work around for the tree to tree first node drop problem. Help is Greatly Appreciated. Tim :) Yahoo! Groups Sponsor ~-- Something is new at Yahoo! Groups. Check out the enhanced email design. http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/