Re: CoreData custom view on NSTableView
Re: CoreData custom view on NSTableView
- Subject: Re: CoreData custom view on NSTableView
- From: Chris Hanson <email@hidden>
- Date: Sat, 15 Dec 2007 17:51:30 -0800
On Dec 15, 2007, at 4:53 PM, Devraj Mukherjee wrote:
Obviously the neat thing would be tot do
this when the table is displayed rather than when I save the data so
any changes to the address book data is reflected when the table is
displayed.
So my thoughts are, is there a way I can write say an instance methods
to the classes/entities in the CoreData model and then bind each
column to call those methods to return their looked up data?
Absolutely. Just create an NSManagedObject subclass for the entity
your table is showing, and add the appropriate methods to it.
There's nothing special about Core Data here. You can invoke any zero-
argument method that returns an object or scalar value using Key-Value
Coding, which is all the NSArrayController that you're using to manage
the table is doing.
-- Chris
_______________________________________________
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