Re: Bindings: problem changing model programmatically
Re: Bindings: problem changing model programmatically
- Subject: Re: Bindings: problem changing model programmatically
- From: Jim Correia <email@hidden>
- Date: Fri, 18 Jan 2008 18:14:12 -0500
On Jan 18, 2008, at 2:26 PM, Stephen Zyszkiewicz wrote:
I'm having trouble with Cocoa Bindings. I'm trying to set the model
array programmatically. I'm trying to do this in Scott Stevenson's
MailDemo example. I have this:
- (IBAction)changeArray:(id)sender {
[[self mutableArrayValueForKey:@"_mailboxes"] addObject:[[Mailbox
alloc] init]];
}
which should be KVO compliant. What happens is that it doesn't show
up until another change is made, like clicking the + or - in the
interface to add or remove a mailbox.
Your iVar's name is _ mailboxes, but the KVC/KVO key is "mailboxes"
with no leading underscore.
Jim
_______________________________________________
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