Re: Outline View DnD
Re: Outline View DnD
- Subject: Re: Outline View DnD
- From: Nathan Vander Wilt <email@hidden>
- Date: Sat, 8 Aug 2009 09:48:17 -0700
On Aug 7, 2009, at 6:56 AM, bryscomat wrote:
... Now the dilemma comes when I want to get the drag and drop to
work in a specific way. I want the playlists to be able to be
dragged and placed in any order, but not above the separator. I have
achieved this using the delegate method validateDrop: and returning
DragOperationNone if the proposed child index is less than the index
of the separator. However, I also want a user to be able to drag the
items in the Singers group around in any order as well, and this
doesn't allow that. I found that if in validateDrop: I check if the
item is a singer and that the parent item is the singers group to
allow it that it works for that. How do I get both of these to
happen? If anyone could just point me in the right direction I'll
take it from there.
Take a look at the -[NSOutlineView setDropItem:dropChildIndex:]
method. You can call it from your validateDrop method to change the
proposedItem and proposedChildIndex if they are not appropriate.
hth,
-natevw
_______________________________________________
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