Re: [flexcoders] Re: Tree duplicating items - desperate!!!

2008-06-02 Thread Josh McDonald
If you're changing the tree as you drag over it, it probably repaints and
relayouts a whole bunch of stuff, and depending on where you happen to be in
the frame it could be losing some state about being draggedOver?

Can you extract just enough code to replicate your bug into a tiny project
and upload it somewhere?

-Josh

On Tue, Jun 3, 2008 at 10:22 AM, Rafael Faria [EMAIL PROTECTED]
wrote:

   I have been tracing and changing the whole script for almost a week
 and still getting this bug. The thing is everything looks all right,
 the debug version doesnt throw any error. So its a bit hard to find
 out what's wrong.

 tell me something, how would you do to create branches on dragging
 over an element? you know, dynamically!?

 do you have any suggestion?!


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Alex
 Harui [EMAIL PROTECTED] wrote:
 
  I would add trace statements showing when you add/remove stuff and see
  if the log makes sense. You could be dragging over or out in some way
  that you don't expect
 
 
 
  
 
  From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com [mailto:
 flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On
  Behalf Of Rafael Faria
  Sent: Sunday, June 01, 2008 5:18 PM
  To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
  Subject: [flexcoders] Re: Tree duplicating items - desperate!!!
 
 
 
  If i remove those lines it wont create the brances dynamically...
 
  What i do is when i drag over a page that is not a branch it
  automatically transform it as a branch, if i don't drop and drag out
  of it, it will trasnform back to a simple leaf. that's why i need to
  leave it on the dragover.
 
  if you have a better solution please i would love to hear because this
  is killing me.
 
  i don't know why is duplicating like i showed on the screenshots
  because even when i use the debug version i get no errors.
 
  helpp
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto:
 flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com
  , Alex Harui aharui@ wrote:
  
   What are the four lines? If you remove them what happens? Step through
   dragCompleteHandler.
  
  
  
   
  
   From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto:
 flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com
  [mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto:
 flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com
  ] On
   Behalf Of Rafael Faria
   Sent: Thursday, May 29, 2008 11:14 PM
   To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com mailto:
 flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com
   Subject: [flexcoders] Tree duplicating items - desperate!!!
  
  
  
   fellows,
  
   i have been bugging you guys about my tree component for a quite long
   time and i'm almost finish. the only thing i still have to deal is a
   bug that's happening.
  
   What happen is, i have to create branches on the fly, dynamically
   whenever i dragover a item.
  
   here is the code to do that (anyone think in a better solution?)
  
   var currNodeOver:TreeItemRenderer =
   TreeItemRenderer(indexToItemRenderer(calculateDropIndex(event)));
   if (currNodeOver == null) return;
   [EMAIL PROTECTED] = true;
   expandItem(currNodeOver.data,true, true);
  
   What is happening is along the drag and drop, an item has been
   duplicated somehow. I have cleaned the code on the point to leave just
   that 4 lines on my extended tree and guess what? still happens.
  
   so i'm not sure if it's a tree bug or is something wrong with those
   lines, but sometimes (and it doesnt happen everytime) when i drag a
   children from a branch it duplicates, which mean that the one i was
   dragging does not move.
  
   I'm not sure if i'm being clear, but i hope i can get some help on
   that cause i just lost a couple days trying to fix it.
  
   Here is some screen shot of what's happening.
  
   Picture 1, the normal state.
   http://www.enilsson.com/assets/images/pic1.png
  http://www.enilsson.com/assets/images/pic1.png
   http://www.enilsson.com/assets/images/pic1.png
  http://www.enilsson.com/assets/images/pic1.png 
  
   Picture 2, the bug
   http://www.enilsson.com/assets/images/pic2.png
  http://www.enilsson.com/assets/images/pic2.png
   http://www.enilsson.com/assets/images/pic2.png
  http://www.enilsson.com/assets/images/pic2.png 
  
   Like i said. it should had moved instead of duplicate. Most of the
   time is working, everything works... but suddenly it duplicates and
   debug doesn't return any errors.
  
   helpp
  
 

  




-- 
Therefore, send not to know For whom the bell tolls. It tolls for thee.

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


RE: [flexcoders] Re: Tree duplicating items - desperate!!!

2008-06-01 Thread Alex Harui
I would add trace statements showing when you add/remove stuff and see
if the log makes sense.  You could be dragging over or out in some way
that you don't expect

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Rafael Faria
Sent: Sunday, June 01, 2008 5:18 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Tree duplicating items - desperate!!!

 

If i remove those lines it wont create the brances dynamically...

What i do is when i drag over a page that is not a branch it
automatically transform it as a branch, if i don't drop and drag out
of it, it will trasnform back to a simple leaf. that's why i need to
leave it on the dragover.

if you have a better solution please i would love to hear because this
is killing me.

i don't know why is duplicating like i showed on the screenshots
because even when i use the debug version i get no errors.

helpp 

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Alex Harui [EMAIL PROTECTED] wrote:

 What are the four lines? If you remove them what happens? Step through
 dragCompleteHandler.
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of Rafael Faria
 Sent: Thursday, May 29, 2008 11:14 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Tree duplicating items - desperate!!!
 
 
 
 fellows,
 
 i have been bugging you guys about my tree component for a quite long
 time and i'm almost finish. the only thing i still have to deal is a
 bug that's happening.
 
 What happen is, i have to create branches on the fly, dynamically
 whenever i dragover a item.
 
 here is the code to do that (anyone think in a better solution?)
 
 var currNodeOver:TreeItemRenderer =
 TreeItemRenderer(indexToItemRenderer(calculateDropIndex(event)));
 if (currNodeOver == null) return;
 [EMAIL PROTECTED] = true;
 expandItem(currNodeOver.data,true, true);
 
 What is happening is along the drag and drop, an item has been
 duplicated somehow. I have cleaned the code on the point to leave just
 that 4 lines on my extended tree and guess what? still happens.
 
 so i'm not sure if it's a tree bug or is something wrong with those
 lines, but sometimes (and it doesnt happen everytime) when i drag a
 children from a branch it duplicates, which mean that the one i was
 dragging does not move.
 
 I'm not sure if i'm being clear, but i hope i can get some help on
 that cause i just lost a couple days trying to fix it.
 
 Here is some screen shot of what's happening.
 
 Picture 1, the normal state. 
 http://www.enilsson.com/assets/images/pic1.png
http://www.enilsson.com/assets/images/pic1.png 
 http://www.enilsson.com/assets/images/pic1.png
http://www.enilsson.com/assets/images/pic1.png  
 
 Picture 2, the bug 
 http://www.enilsson.com/assets/images/pic2.png
http://www.enilsson.com/assets/images/pic2.png 
 http://www.enilsson.com/assets/images/pic2.png
http://www.enilsson.com/assets/images/pic2.png  
 
 Like i said. it should had moved instead of duplicate. Most of the
 time is working, everything works... but suddenly it duplicates and
 debug doesn't return any errors.
 
 helpp