Re: NSDragOperationMove type drag&drop in outline views
Re: NSDragOperationMove type drag&drop in outline views
- Subject: Re: NSDragOperationMove type drag&drop in outline views
- From: Matt Neuburg <email@hidden>
- Date: Wed, 15 Sep 2004 15:00:46 -0700
On Wed, 15 Sep 2004 22:09:12 +0100, Robert Goldsmith
<email@hidden> said:
>Hi :)
>
>Ok, maybe I am blind but, although Outlineviews seem to do most of the
>rest for you, drag&drop wise, they don't seem to request the removal of
>the items that have just been dragged to a new location.
>
>Currently, when requested to save the items to the
>pasteboard(outlineView:writeItems:toPasteboard:), I do. I then validate
>the drop point
>(outlineView:validateDrop:proposedItem:proposedChildIndex:) with a
>return of NSDragOperationMove, as this is what I want to do, then when
>asked to accept the drop (outlineView:acceptDrop:item:childIndex:), I
>do so, inserting the pasteboard items where requested. But the old
>copies of the items are not removed so I end up with 2 copies of my
>items.
>
>Maybe I have misread the docs and I actually need to keep track of this
>myself (and, if so, how, when I am simply handed an array of items
>which could have come from anywhere...) or maybe I need to implement
>another dataSource or delegate method, but I can't find anything that
>sounds sensible :(
>
>Could someone please put me out of my misery? :)
Study the working example on your hard disk (it's called
DragNDropOutlineView) and think about how your code differs from that. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden