• 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
bind tableview to arraycontroller
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bind tableview to arraycontroller


  • Subject: bind tableview to arraycontroller
  • From: Hans van der Meer <email@hidden>
  • Date: Sat, 23 Feb 2008 22:02:00 +0100

Step by step I try to master the kvc-kvo-bindings matter.
Now I have:
NSArrayController bound to an NSArray in a class in my program
NSTableView bound to the NSArrayController as follows:
columns of the table are bound to fields in the objects held by the array.


The problem I am wrestling with: how to see the tableview reacting to changes in the array.

After the discussions in this group I refrained from explicitely invoking kvo on the array in my class. It turns out the NSArrayController does get the changes, even if these are not at once visible in the tableview.
But if I touch the column header in the tableview then all of a sudden the contents becomes visible. If in IB I select off for the 'enabled' state in the 'control' part of the table view attributes, then the visual updating does not occur.
One further point to note: clicking in the first column did not update the view, though I cannot see a difference in binding with the other columns!


My conclusion therefore: obviously am I doing something wrong in the interaction between the tableview and the arraycontroller. The controller apparently has received new content but not signalled that to the tableview; the latter changing when prodded into action by the click in the column header.

Someone who knows what exactly is going on? I have read the XCode documentation in the "Cocoa Binding Programming Topics" but could not solve it from that text.

Hans van der Meer




_______________________________________________

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


  • Follow-Ups:
    • Re: bind tableview to arraycontroller
      • From: "Adam Gerson" <email@hidden>
  • Prev by Date: Re: Unobserved Changes
  • Next by Date: Re: Private Methods
  • Previous by thread: NSPersistentDocument loading into NSManagedObjectContext
  • Next by thread: Re: bind tableview to arraycontroller
  • Index(es):
    • Date
    • Thread