Re: Bindings: problem changing model programmatically
Re: Bindings: problem changing model programmatically
- Subject: Re: Bindings: problem changing model programmatically
- From: Stephen Zyszkiewicz <email@hidden>
- Date: Fri, 18 Jan 2008 15:40:05 -0800
That was exactly the problem! I got that working in MailDemo and my
own project!
Thank you!
Steve
On Jan 18, 2008, at 3:14 PM, Jim Correia wrote:
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