Re: KVC and arrays
Re: KVC and arrays
- Subject: Re: KVC and arrays
- From: mmalc Crawford <email@hidden>
- Date: Fri, 22 Jun 2007 10:34:18 -0700
On Jun 22, 2007, at 7:46 AM, Daniel Angermeier wrote:
when I modify myItems, e.g. [myItmes removeLastObject];
the arrayController / the table view are not updated,
unless I call [self setItems:myItems]; after any modification to
myItems.
Is this the correct way to do this, or is there something else I am
missing that would cause the bound objects to be updated if I modifiy
my mutable array ?
This situation is described in numerous places.
It's not a KVC problem, it's a KVO problem.
See, for example, the first item in the helpfully-titled
"Troubleshooting Cocoa Bindings" article at <http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaBindings/Concepts/Troubleshooting.html
>, and also <http://homepage.mac.com/mmalc/CocoaExamples/controllers.html
>.
mmalc
_______________________________________________
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
References: | |
| >KVC and arrays (From: "Daniel Angermeier" <email@hidden>) |