• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Outline View DnD
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Outline View DnD


  • Subject: Re: Outline View DnD
  • From: bryscomat <email@hidden>
  • Date: Mon, 10 Aug 2009 08:30:51 -0500

Thank you. I've gotten some code together that seems to do what I want based on that method.

On Aug 8, 2009, at 11:48 AM, Nathan Vander Wilt wrote:

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

_______________________________________________

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


References: 
 >Outline View DnD (From: bryscomat <email@hidden>)
 >Re: Outline View DnD (From: Nathan Vander Wilt <email@hidden>)

  • Prev by Date: Re: Maintaining an ordered array of attributes in an NSTextStorage subclass
  • Next by Date: Re: Adjusting UIAlertView position
  • Previous by thread: Re: Outline View DnD
  • Next by thread: I want to post !!
  • Index(es):
    • Date
    • Thread