Re: programmatically adding model objects to NSOultineView/NSTreeController
Re: programmatically adding model objects to NSOultineView/NSTreeController
- Subject: Re: programmatically adding model objects to NSOultineView/NSTreeController
- From: mmalc Crawford <email@hidden>
- Date: Sat, 9 Jun 2007 21:36:57 -0700
On Jun 9, 2007, at 2:31 PM, Ken Victor wrote:
How are you adding the new child?
1) in response to user interaction,
I meant programmatically, what is the code?
If you can't use the standard add methods of NSTreeController, is
there any reason why you can't add directly to your model objects?
Apart from that, the proxy object should be KVC compliant.
perhaps, but the following:
[self willChangeValueForKey: @"filteredChildren"];
generates the following compile time warning:
warning: 'KVOutlineObjectProxy' may not respond to '-
willChangeValueForKey:'
willChangeValueForKey is not a KVC method.
<http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Protocols/NSKeyValueCoding_Protocol/index.html
>
my model objects are actually instances of NSProxy
I suspect not.
<http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSProxy_Class/Reference/Reference.html
>
thanx for the pointer. i can't tell you how many times i've read
this! :-) and i just reread to make sure i wasn't missing anything.
note: nowhere does this say whether or not NSProxy implements any of
the KVO/KVC protocols
KVOutlineObjectProxy != NSProxy.
mmalc
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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