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: Gustavo Pizano <email@hidden>
- Date: Wed, 09 Nov 2011 23:31:06 +0100
Hello, I just found this example :
abstract Tree which uses NSTreeController and NSOtulineView, so Im checking on it seems this is what I need :D
I will let you know..
Thanks for the help.
Gustavo
On Nov 9, 2011, at 11:27 PM, Mike Abdullah wrote:
>
> 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