• 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
Binding NSTableView columns to dynamic properties in Core Data?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Binding NSTableView columns to dynamic properties in Core Data?


  • Subject: Binding NSTableView columns to dynamic properties in Core Data?
  • From: Rick Mann <email@hidden>
  • Date: Sun, 30 Dec 2012 19:35:12 -0800

I'm not sure if this is possible with bindings and Core Data, or how much glue code I'm going to have to write to do this, but I thought I'd ask to see if anyone else has done anything like this.

I want to display a table view with a set of columns that's not known at compile time, but rather at run time. The model has one entity for the rows, and related key-value pair entities for each column in the row. These are generated at run time based on the input data, but they are the same for all rows in a set. Each column may be of a different type than the other, but all the entries in a column are the same.

I suspect I'll have to programmatically build the table columns each time the set changes (not quite sure how to do that, but I assume there are obvious methods for adding and removing columns). Once I'm building the columns, I expect I'd have to programmatically bind them to an NSArrayController. Not sure how I map a key name in a table column through the NSArrayController to my main entity, and through that to the related key-value pair entity. Override the primary entity's valueForKey and have it fetch the related property? Any caveats I should look out for?

Suggestions and advice welcome.

Thanks!

--
Rick




_______________________________________________

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: Binding NSTableView columns to dynamic properties in Core Data?
      • From: Keary Suska <email@hidden>
  • Prev by Date: Re: "New" busy cursor in the Finder
  • Next by Date: Re: Binding NSTableView columns to dynamic properties in Core Data?
  • Previous by thread: Re: BAse localisation and strings files compatibility with 10.7
  • Next by thread: Re: Binding NSTableView columns to dynamic properties in Core Data?
  • Index(es):
    • Date
    • Thread