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: Mon, 18 Feb 2008 10:26:13 +0100
On 17 feb 2008, at 03:25, mmalc crawford wrote:
On Feb 16, 2008, at 9:34 AM, Hans van der Meer wrote:
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"];
Don't do this.
RTFineM.
Please forgive me my ignorance. But I do not understand why the change
bracketing should not be done. I have struggled a lot with updating a
NSMutableArray bound in IB to an NSArrayController. It was (at least
for me) impossible to get changes like addObject to be reflected in
the coupled tableview UNLESS I bracketed the changes in the manner
indicated above.
I would gladly learn where I am erring. So please could you elaborate
on this statement and indicate how then the coupling array-IBbinding-
tableview can be effected.
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