• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Bindings: problem changing model programmatically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Bindings: problem changing model programmatically (From: Stephen Zyszkiewicz <email@hidden>)
 >Re: Bindings: problem changing model programmatically (From: Jim Correia <email@hidden>)

  • Prev by Date: Re: App-specific URLs and the pasteboard. Need help.
  • Next by Date: Splitview + Scrollview pinning
  • Previous by thread: Re: Bindings: problem changing model programmatically
  • Next by thread: Re: Problem when inheriting settings in xcconfig files
  • Index(es):
    • Date
    • Thread