Re: Loading saved file into NSArrayController
Re: Loading saved file into NSArrayController
- Subject: Re: Loading saved file into NSArrayController
- From: Hans van der Meer <email@hidden>
- Date: Sat, 16 Feb 2008 18:34:42 +0100
On 16 feb 2008, at 16:14, Mike Abdullah wrote:
On 11 Feb 2008, at 15:51, Davide Scheriani wrote:
well,
the NSArrayController is bound to an array in MyDocument class file.
When I get back my datas from the file I reafill the array and the
NSArrayC should update
the datas.But I dont see doing this.
Ill have a look into the documentation of MVC anw...
Ah, in which case then I suspect you are not refilling the
document's array in a KVC-compliant manner. Care to post some sample
code?
It might be of use to remember that changes within an NSMutableArray
(addObject, remove...) do not by themselves lead tot calling the
class's observers. I found it useful to bracket the changes in this
manner:
[self willChangeValueForKey:@"theArray"];
// changes to the contents of the array
[self didChangeValueForKey:@"theArray"];
Hope this helps.
Hans van der Meer
_______________________________________________
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