Re: Dragging to Rearrange Outline View
Re: Dragging to Rearrange Outline View
- Subject: Re: Dragging to Rearrange Outline View
- From: Kyle Sluder <email@hidden>
- Date: Sat, 27 Sep 2014 08:14:16 -0700
On Sep 27, 2014, at 6:54 AM, Charles Jenkins <email@hidden> wrote:
>
> I have a question that may be truly obvious and stupid, but here goes anyway.
>
> In my application, I’ll display an outline view, and I want the user to be able to drag nodes around to rearrange the tree however he likes.
>
> The table objects’ drag-related functions I’ve found seem to rely on the pasteboard, as if we were dragging information in from the Finder or another application.
>
> Are those the functions I should be looking at for rearranging the outline, or am I barking up the wrong tree?
The pasteboard is indeed the way to go. After all, for any arbitrary outline view, the user could drag from your that outline view to another app.
If in your case it only makes sense to drop within the outline view, you can use a custom pasteboard type that contains no data.
(This is actually how Safari tabs work.)
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden