RE: [flexcoders] getDropParent() when the branch is closed.

2005-07-11 Thread Matt Chotin










Maybe the dragOver event keeps firing
though every time the cell changes? Im sure there must be something
firing that you could use as a trigger.



Matt











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Krueger
Sent: Friday, July 08, 2005 7:59
AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]
getDropParent() when the branch is closed.





Unfortunately I just tried to do something
like this. The itemRollOver doesnt fire when you are dragging over
a itemL







Jeff 













From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Matt Chotin
Sent: Thursday, July 07, 2005
10:54 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]
getDropParent() when the branch is closed.





Maybe you could add a itemRollOver handler
on the Tree so that when you are dragging (indicated by dragEnter I guess) and
you encounter a branch you could make sure the branch gets opened?



Matt















From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Jeff Krueger
Sent: Thursday, July 07, 2005 2:34
PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders]
getDropParent() when the branch is closed.





All,




I am trying to drag an item from a grid and drop it on a tree control. I
have found that the getDropParent seems to be the best bet when trying to find
where to add a new child node to. The only problem I am having is if the
user chooses to drop the item on a branch that is currently closed, the
getDropParent() call returns one level higher. If the branch is set to
open even with no children nodes then everything works. I can kind of
understand why it works like this, but is there a way to work around
this. Below is my dragDrop method, pretty much what everyone else has
posted. I could expand all branches when the drag begins but that could
be ugly.





public function
doDragDrop(event:Object)


{


doDragExit( event);


var dragItems = event.dragSource.dataForFormat(
items );


var targetForDrop = tree.getDropParent();


for ( var i = 0; i dragItems.length; i++)


{



targetForDrop.addTreeNode(test,dragItems[i]);


tree.setIsOpen(targetForDrop, true);


tree.selectItem(targetForDrop, true);

}

}



Thanks







Jeff 





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




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






--
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 




 
  
  Computer
  software testing 
  
  
  Macromedia
  flex 
  
  
  Development
  
  
 
 
  
  Software
  developer 
  
  
  
  
  
  
  
 






--
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



  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.



  











RE: [flexcoders] getDropParent() when the branch is closed.

2005-07-08 Thread Jeff Krueger










Unfortunately I just tried to do something
like this. The itemRollOver doesnt fire when you are dragging over a
itemL







Jeff 













From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Matt Chotin
Sent: Thursday, July 07, 2005
10:54 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]
getDropParent() when the branch is closed.





Maybe you could add a itemRollOver handler
on the Tree so that when you are dragging (indicated by dragEnter I guess) and
you encounter a branch you could make sure the branch gets opened?



Matt















From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Jeff Krueger
Sent: Thursday, July 07, 2005 2:34
PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders]
getDropParent() when the branch is closed.





All,




I am trying to drag an item from a grid and drop it on a tree control. I
have found that the getDropParent seems to be the best bet when trying to find
where to add a new child node to. The only problem I am having is if the
user chooses to drop the item on a branch that is currently closed, the
getDropParent() call returns one level higher. If the branch is set to
open even with no children nodes then everything works. I can kind of
understand why it works like this, but is there a way to work around this.
Below is my dragDrop method, pretty much what everyone else has posted. I
could expand all branches when the drag begins but that could be ugly.





public function
doDragDrop(event:Object)


{


doDragExit( event);


var dragItems = event.dragSource.dataForFormat(
items );


var targetForDrop = tree.getDropParent();


for ( var i = 0; i dragItems.length; i++)


{



targetForDrop.addTreeNode(test,dragItems[i]);


tree.setIsOpen(targetForDrop, true);


tree.selectItem(targetForDrop, true);

}

}



Thanks







Jeff 





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






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









--
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
  
  
  

Computer software testing
  
  
Macromedia flex
  
  
Development
  
  


Software developer
  

   






  
  
  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.



  











RE: [flexcoders] getDropParent() when the branch is closed.

2005-07-07 Thread Matt Chotin










Maybe you could add a itemRollOver handler
on the Tree so that when you are dragging (indicated by dragEnter I guess) and
you encounter a branch you could make sure the branch gets opened?



Matt















From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Jeff Krueger
Sent: Thursday, July 07, 2005 2:34
PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders]
getDropParent() when the branch is closed.





All,




I am trying to drag an item from a grid and drop it on a tree control. I
have found that the getDropParent seems to be the best bet when trying to find
where to add a new child node to. The only problem I am having is if the
user chooses to drop the item on a branch that is currently closed, the
getDropParent() call returns one level higher. If the branch is set to
open even with no children nodes then everything works. I can kind of
understand why it works like this, but is there a way to work around
this. Below is my dragDrop method, pretty much what everyone else has
posted. I could expand all branches when the drag begins but that could
be ugly.





public function
doDragDrop(event:Object)


{


doDragExit( event);


var dragItems = event.dragSource.dataForFormat(
items );


var targetForDrop = tree.getDropParent();


for ( var i = 0; i dragItems.length; i++)


{



targetForDrop.addTreeNode(test,dragItems[i]);


tree.setIsOpen(targetForDrop, true);


tree.selectItem(targetForDrop, true);

}

}



Thanks







Jeff 





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









--
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



  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.