• 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: Drag and drop in NSOutlineView connected to a NSTreeController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Drag and drop in NSOutlineView connected to a NSTreeController
      • From: "I. Savant" <email@hidden>
References: 
 >Drag and drop in NSOutlineView connected to a NSTreeController (From: Darren Ford <email@hidden>)
 >Re: Drag and drop in NSOutlineView connected to a NSTreeController (From: "I. Savant" <email@hidden>)

  • Prev by Date: Re: Drag and drop in NSOutlineView connected to a NSTreeController
  • Next by Date: Re: Drag and drop in NSOutlineView connected to a NSTreeController
  • Previous by thread: Re: Drag and drop in NSOutlineView connected to a NSTreeController
  • Next by thread: Re: Drag and drop in NSOutlineView connected to a NSTreeController
  • Index(es):
    • Date
    • Thread