Re: Binding not setting model property
Re: Binding not setting model property
- Subject: Re: Binding not setting model property
- From: Quincey Morris <email@hidden>
- Date: Sat, 18 Jan 2014 23:17:48 -0800
On Jan 18, 2014, at 22:44 , Roland King <email@hidden> wrote:
> What derived property can I write on the view which removes that dependency?
On Jan 18, 2014, at 20:54 , Quincey Morris <email@hidden> wrote:
> create a derived property on the view or window controller that’s based on the data model property
Sorry, what I wrote doesn’t perhaps read as intended. I meant:
“… create a derived property on the view controller or window controller that’s based on the data model property …”
Assuming the view is in a nib file, this allows you to bind the text field to File’s Owner (the view controller or window controller, almost always) with minimal fuss.
In my experience, the “data model” that UI elements use is almost always a “transformed” variant of the pure data model (or an amalgamation of several pure data models), and it’s conceptually easier to retain if the entire variant is presented by the controller to the views.
_______________________________________________
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