Re: [Q] How to add nested items to NSOutlineView?
Re: [Q] How to add nested items to NSOutlineView?
- Subject: Re: [Q] How to add nested items to NSOutlineView?
- From: JongAm Park <email@hidden>
- Date: Thu, 06 Nov 2008 09:05:03 -0800
Thank you for your answer.
I found same question asked by other person in Cocoa mailing list.
http://www.cocoabuilder.com/archive/message/cocoa/2008/4/7/203440
and an answer refers
http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaBindings/Concepts/Troubleshooting.html#//apple_ref/doc/uid/TP40002148-182809
Benjamin Stiglitz wrote:
However, if I get reference of an item in existing view and insert
new item in its data source, NSMutableArray, it can't display the
newly added nested items.
I tried NSTreeController's rearragneObjects and the NSOutlineView's
reloadItem:reloadChildren, but it doesn't seem to work for me.
Can anyone tell me how to add new items?
Since you’re using NSTreeController, you should modify the array in a
KVO-compatible way. Take a look at
<http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Protocols/NSKeyValueCoding_Protocol/Reference/Reference.html#//apple_ref/occ/instm/NSObject/mutableArrayValueForKeyPath:>
-Ben
_______________________________________________
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