• 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: NSArrayController Frustration
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSArrayController Frustration


  • Subject: Re: NSArrayController Frustration
  • From: "I. Savant" <email@hidden>
  • Date: Sat, 24 Nov 2007 22:34:58 -0500

I am expecting that when I do [docArray addObject:x] that the array controller will observe the change and do a reloadData on the NSTableView. That isn't happening.

Read the Key Value Coding and Key Value Observing documentation. Your problem is a common one. If you're modifying the bound-to array, you need to enclose the modification with will/ didChangeValueForKey: ... otherwise you're "changing the array behind the controller's back" because you're not sending proper KVO notifications to let it know a change occurred.


--
I.S.


_______________________________________________

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: 
 >NSArrayController Frustration (From: David Carlisle <email@hidden>)

  • Prev by Date: Re: How do I convert an NSString into a 16 bit int
  • Next by Date: Re: How do I convert an NSString into a 16 bit int
  • Previous by thread: Re: NSArrayController Frustration
  • Next by thread: Re: NSArrayController Frustration
  • Index(es):
    • Date
    • Thread