Re: NSOutline/NSTable-View: delegate or bindings?
Re: NSOutline/NSTable-View: delegate or bindings?
- Subject: Re: NSOutline/NSTable-View: delegate or bindings?
- From: Keith Duncan <email@hidden>
- Date: Sat, 15 Dec 2007 19:27:57 +0000
If the latter, I noticed that -arrangedObjects returns a "proxy
root tree". What is that?
It is an implementation detail :)
It is important to note that if you are developing on Leopard that the
proxy object _NSControllerTreeProxy inherits from NSObject NOT
NSTreeNode as you might expect. This pattern is observed by
_NSControllerArrayProxy and _NSControllerArrayProxyMutatorArray
(proxies returned by NSArrayController) which inherit from NSArray and
NSMutableArray respectively.
The effect this has is that you can call NSArray category methods on
the object returned by an array controller's -arrangedObjects method
but you CAN'T call NSTreeNode category methods on the object returned
by a tree controller's -arrangedObjects method.
I filed a bug prior to Leopard's release but it wasn't fixed, no
indication as to wether it will be or not.
The work around is to class-dump the AppKit to get the header for
_NSControllerTreeProxy and then implement your category methods on
both NSTreeNode and _NSControllerTreeProxy. Laborious I know, I tried
to tell them this.
- Keith
_______________________________________________
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