Re: So… no NSOtulineView Drag and Drop with NSTreeController?
Re: So… no NSOtulineView Drag and Drop with NSTreeController?
- Subject: Re: So… no NSOtulineView Drag and Drop with NSTreeController?
- From: Mike Abdullah <email@hidden>
- Date: Wed, 09 Nov 2011 22:27:32 +0000
On 9 Nov 2011, at 22:17, Gustavo Pizano wrote:
> Hello all.
>
> I have been looking for some guidance or light on this matter,
>
> The closest I was able to find was this page:
>
> http://theocacao.com/document.page/130
>
> but then checking on Apple mail list I read some comments that the above solution makes uses of undocumented methods.
That article was for Tiger. Leopard resolved this problem by introducing NSTreeNode, which is the "item" you get passed by NSOutlineView.
>
>
> Im using a NSTreeController to populate/manage an NSOutlineView content. Now I need a way to allow reordering by drag and drop the outlineview rows, but it seems this is little bit tricker than I thought.
>
>
> Can you give me some guidance on what to do?
>
> Just a quick word. I implemented the datasouce Drop methods, also the Drag methods of the NSDragging protocol, but none of them gets called. Then while reading I saw that I should implemented some dummy methods for the data source, still no drag and drop yet, not even the method calls.. :(
There is no need to implement the NSDragging methods, the outline view does that itself. You need to:
- Implement the datasource drop methods, no others are needed
- Do -registerForDraggedTypes: on the outline for the types you're interested in
_______________________________________________
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