Re: Drag and drop in NSOutlineView connected to a NSTreeController
Re: Drag and drop in NSOutlineView connected to a NSTreeController
- Subject: Re: Drag and drop in NSOutlineView connected to a NSTreeController
- From: Darren Ford <email@hidden>
- Date: Wed, 15 Mar 2006 00:37:30 +1100
Yup, found that one.
But it is a hack using a private API. It seems too inelegant for
Cocoa, given that the rest of the bindings stuff is quite elegant.
Having to set up a false NSOutlineViewDataSource and returning dodgy
values seems like a problem waiting to happen with the next 10.4.x
release.
Also, it appears that with this method you have to manually insert/
remove the objects from the treecontroller yourself in the
'acceptDrop' call. Given that the NSTreeController 'controls' the
objects it manages, having to write code to remove an object from one
tree branch's NSArrayController and insert it into the other and then
refresh the NSTreeController feels like I'm doing something wrong and
completely unbindings-like.
Cheers -- Darren.
On 15/03/2006, at 12:20 AM, I. Savant wrote:
On Mar 14, 2006, at 7:21 AM, Darren Ford wrote:
I've been putting together a simple app to learn how to use
NSTreeController to bind to an NSOutlineView. All's well with
basic adding/removing etc. but I've been having a few problems
getting drag and drop within the outlineview working. I've looked
through the Apple doco and on Google but haven't had any luck.
Really? When I google "nstreecontroller drag and drop", the very
first result is a beautifully-written tutorial on the subject:
http://theocacao.com/document.page/130
Are you taking a different approach that makes this article
unusable to you? If so, you'll probably need to specify.
--
I.S.
_______________________________________________
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