Re: Restoring a NSTreeController selection
Re: Restoring a NSTreeController selection
- Subject: Re: Restoring a NSTreeController selection
- From: "email@hidden" <email@hidden>
- Date: Thu, 24 Jun 2010 10:43:49 +0100
On 24 Jun 2010, at 09:56, Keith Duncan wrote:
>
> On 24 Jun 2010, at 09:35, email@hidden wrote:
>
>> 1. NSTreeController items are subclasses of NSTreeNode (see the 10.5 release notes).
>
> This isn't strictly true, from the docs:
>
> "In Leopard, the arrangedObjects method returns a proxy that responds to the NSTreeNode methods"
>
Sorry. What I meant to say was When bound to an NSTreeController, NSOutlineView's row items will be NSTreeNodes
> In Leopard the arranged objects weren't actually NSTreeNodes, they simply conform to the interface of it. The implication being that you can't add category methods to NSTreeNode and call them on the return value of -[NSTreeController arrangedObjects]. This is filed as rdar://problem/5438559
>
On 10.6 it would seem that -[NSTreeController arrangedItems] are still instances NSTreeControllerTreeNode which is not an NSTreeNode subclass.
Instances do seem to respond to other NSTreeNode methods such as -parentNode.
Regards
Jonathan Mitchell
Developer
Mugginsoft LLP
http://www.mugginsoft.com_______________________________________________
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