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

Re: bind tableview to arraycontroller


  • Subject: Re: bind tableview to arraycontroller
  • From: "Adam Gerson" <email@hidden>
  • Date: Sat, 23 Feb 2008 19:40:21 -0500

Your NSArray needs to be an array of KVC compliant objects. Is this the case?

Do you have the NSTableColumn's value binding set to the controller
key "arrangedObjects" and the model key path set to an attribute of
your KVC class?

You could use a CoraData object to do some of the heavy lifting for you.

Adam



On 2/23/08, Hans van der Meer <email@hidden> wrote:
> 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
>
_______________________________________________

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: 
 >bind tableview to arraycontroller (From: Hans van der Meer <email@hidden>)

  • Prev by Date: Trying to contact Cathy Shive
  • Next by Date: Re: Private Methods
  • Previous by thread: bind tableview to arraycontroller
  • Next by thread: Trying to contact Cathy Shive
  • Index(es):
    • Date
    • Thread