Re: A TableView Binding question
Re: A TableView Binding question
- Subject: Re: A TableView Binding question
- From: Kyle Sluder <email@hidden>
- Date: Tue, 22 Feb 2011 23:50:33 -0800
On Mon, Feb 21, 2011 at 11:58 PM, Motti Shneor
<email@hidden> wrote:
> Now, I need one of the table-columns, to be bound NOT to a specific attribute of the entity (like firstName or salary) but rather to the entity (managed object) itself.
>
> Of course the "Entity" is not something presentable on the column --- but I specify (and write) a specific ValueTransformer object that should calculate the displayed content from the managed object.
I must ask what circumstance requires you to bind a column directly to
the managed objects. Nobody should be querying the table view about
its objects; they should be asking the controller instead. You can use
a custom NSManagedObject subclass to provide a property whose value
can be rendered in the table view.
I'm not claiming you are taking the wrong approach, but I would like
to consider the possibility of doing it the other way.
--Kyle Sluder
_______________________________________________
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