Outline View DnD
Outline View DnD
- Subject: Outline View DnD
- From: bryscomat <email@hidden>
- Date: Fri, 7 Aug 2009 08:56:47 -0500
Hello all,
I currently have an outline view in my interface driven by a managed
object context. When the program starts, the first four items are
created by the program in an In-memory persistent store. The first 3
are leafs that change the view on the right. The Singers item is a
group where any number of "singers" can be added as children, followed
by a separator cell (similar to Apples Source List example). It looks
like this:
Audio CD (if one is inserted, if not it will be added here when it is)
Library
Store
|>Singers
-----------------
Following that are "playlist" items that are created when a user
clicks a button. They are automatically added to the end of the tree,
and are created using a core data XML store, so that any playlists
that are added are persistent. 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.
Audio CD
Library
Store
|>Singers
John
Brady
Susan
---------------------
Playlist 1
Rock Playlist
etc...
Thanks,
Bryan
_______________________________________________
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