RE: [flexcoders] drag and drop between list - changing default behavior to allow dropping "into" list item.

2008-03-14 Thread Alex Harui
The Tree code is extra complex as it handles parent/child relationships.
Yours can be simpler.
 
I suppose you could turn off dropEnabled on the List and have each
renderer be a dropTarget.  Should work, but I don't recall ever seeing a
complete solution.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Thibaud Van Vreckem
Sent: Friday, March 14, 2008 2:18 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] drag and drop between list - changing default
behavior to allow dropping "into" list item.



Thanks Alex,

Actually,that's exactly the answer I was afraid off..
when looking at the said code, I have a feeling, -since I'm using custom
itemrenderrer in my list- it might be simpler to dispatch mouse over
events from there.
Am I wrong ?



On Fri, Mar 14, 2008 at 3:04 AM, Alex Harui <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote:




Tree has drop into folder code.  Is that what you're looking
for?

 





From: flexcoders@yahoogroups.com
<mailto:flexcoders@yahoogroups.com>  [mailto:flexcoders@yahoogroups.com
<mailto:flexcoders@yahoogroups.com> ] On Behalf Of Thibaud Van Vreckem
Sent: Thursday, March 13, 2008 10:59 AM
To: flexcoders@yahoogroups.com
<mailto:flexcoders@yahoogroups.com> 
    Subject: [flexcoders] drag and drop between list - changing
default behavior to allow dropping "into" list item.

 

Here we go again... sorry message was sent unfinished by
mistake..

I Have 2 List:

"list1" contains folders.
"list2" contains files

they are both drag and drop enabled:
dragEnabled="true" 
dragMoveEnabled="true" 
dropEnabled="true"
dragEnter="dragEnterHandler(event)"


I'm keeping the default dnd behavior for reordering only within
each list.

private function dragEnterHandler(event:DragEvent):void {
   if (event.dragInitiator != event.currentTarget) {
event.preventDefault();
  }
}

Now How should I go about enabling my files items from list2 to
be dropped over the folder items in list1 (instead of being inserted in
the list rows). 
is there an easy way to detect which item in the list I am
rolling over without resorting to some fancy coordinate position
detection ?

Thanks.






 


Re: [flexcoders] drag and drop between list - changing default behavior to allow dropping "into" list item.

2008-03-14 Thread Thibaud Van Vreckem
Thanks Alex,

Actually,that's exactly the answer I was afraid off..
when looking at the said code, I have a feeling, -since I'm using custom
itemrenderrer in my list- it might be simpler to dispatch mouse over events
from there.
Am I wrong ?


On Fri, Mar 14, 2008 at 3:04 AM, Alex Harui <[EMAIL PROTECTED]> wrote:

>Tree has drop into folder code.  Is that what you're looking for?
>
>
>  --
>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Thibaud Van Vreckem
> *Sent:* Thursday, March 13, 2008 10:59 AM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] drag and drop between list - changing default
> behavior to allow dropping "into" list item.
>
>
>
> Here we go again... sorry message was sent unfinished by mistake..
>
> I Have 2 List:
>
> "list1" contains *folders.
> *"list2" contains *files
>
> *they are both drag and drop enabled:
> dragEnabled="true"
> dragMoveEnabled="true"
> dropEnabled="true"
> dragEnter="dragEnterHandler(event)"
>
> *
> *I'm keeping the default dnd behavior for reordering only *within *each
> list.
>
> private function dragEnterHandler(event:DragEvent):void {
>if (event.dragInitiator != event.currentTarget) {
> event.preventDefault();
>   }
> }
> *
> *Now How should I go about enabling my files items from list2 to be
> dropped *over *the folder items in list1 (instead of being inserted in the
> list rows).
> is there an easy way to detect which item in the list I am rolling over
> without resorting to some fancy coordinate position detection ?
>
> Thanks.
>
>  
>


RE: [flexcoders] drag and drop between list - changing default behavior to allow dropping "into" list item.

2008-03-13 Thread Alex Harui
Tree has drop into folder code.  Is that what you're looking for?

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Thibaud Van Vreckem
Sent: Thursday, March 13, 2008 10:59 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] drag and drop between list - changing default
behavior to allow dropping "into" list item.

 

Here we go again... sorry message was sent unfinished by mistake..

I Have 2 List:

"list1" contains folders.
"list2" contains files

they are both drag and drop enabled:
dragEnabled="true" 
dragMoveEnabled="true" 
dropEnabled="true"
dragEnter="dragEnterHandler(event)"


I'm keeping the default dnd behavior for reordering only within each
list.

private function dragEnterHandler(event:DragEvent):void {
   if (event.dragInitiator != event.currentTarget) {
event.preventDefault();
  }
}

Now How should I go about enabling my files items from list2 to be
dropped over the folder items in list1 (instead of being inserted in the
list rows). 
is there an easy way to detect which item in the list I am rolling over
without resorting to some fancy coordinate position detection ?

Thanks.

 



RE: [flexcoders] drag and drop between list - changing default behavior to allow dropping "into" list item.

2008-03-13 Thread Alex Harui
Sounds like you want calculateDropIndex

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Thibaud Van Vreckem
Sent: Thursday, March 13, 2008 10:59 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] drag and drop between list - changing default
behavior to allow dropping "into" list item.

 

Here we go again... sorry message was sent unfinished by mistake..

I Have 2 List:

"list1" contains folders.
"list2" contains files

they are both drag and drop enabled:
dragEnabled="true" 
dragMoveEnabled="true" 
dropEnabled="true"
dragEnter="dragEnterHandler(event)"


I'm keeping the default dnd behavior for reordering only within each
list.

private function dragEnterHandler(event:DragEvent):void {
   if (event.dragInitiator != event.currentTarget) {
event.preventDefault();
  }
}

Now How should I go about enabling my files items from list2 to be
dropped over the folder items in list1 (instead of being inserted in the
list rows). 
is there an easy way to detect which item in the list I am rolling over
without resorting to some fancy coordinate position detection ?

Thanks.

 



[flexcoders] drag and drop between list - changing default behavior to allow dropping "into" list item.

2008-03-13 Thread Thibaud Van Vreckem
Hello,

I Have 2 List:

"list1" contains *folders.
*"list2" contains *files

*they are both drag and drop enabled:
dragEnabled="true"
dragMoveEnabled="true"
dropEnabled="true"
dragEnter="dragEnterHandler(event)"

*
*I'm keeping the default dnd behavior for reordering within each list.

private function dragEnterHandler(event:DragEvent):void {
if (event.dragInitiator != event.currentTarget) {

// Explicitly handle the dragDrop event.
event.preventDefault();




}

}
*
*


[flexcoders] drag and drop between list - changing default behavior to allow dropping "into" list item.

2008-03-13 Thread Thibaud Van Vreckem
Here we go again... sorry message was sent unfinished by mistake..

I Have 2 List:

"list1" contains *folders.
*"list2" contains *files

*they are both drag and drop enabled:
dragEnabled="true"
dragMoveEnabled="true"
dropEnabled="true"
dragEnter="dragEnterHandler(event)"

*
*I'm keeping the default dnd behavior for reordering only *within *each
list.

private function dragEnterHandler(event:DragEvent):void {
   if (event.dragInitiator != event.currentTarget) {
event.preventDefault();
  }
}
*
*Now How should I go about enabling my files items from list2 to be dropped
*over *the folder items in list1 (instead of being inserted in the list
rows).
is there an easy way to detect which item in the list I am rolling over
without resorting to some fancy coordinate position detection ?

Thanks.