Re: Accepting current edited text field contents
Re: Accepting current edited text field contents
- Subject: Re: Accepting current edited text field contents
- From: Quincey Morris <email@hidden>
- Date: Fri, 04 Mar 2011 11:22:34 -0800
On Mar 4, 2011, at 11:09, Quincey Morris wrote:
> Instead of binding your text fields directly to your data model, bind them instead to a NSObjectController object in your NIB file, which is in turn bound to the data model.
Just to clarify, in case you haven't used this trick before:
-- You bind all of your text fields to the *same* NSObjectController.
-- Bind the object controller through File's Owner to your data model.
-- Use "selection" for the controller key on the object controller. (Unlike a NSArrayController, it's only bound to one content thing, so its selection is always that one thing.)
-- Use the data model property key or key path as the model key on the object controller.
(There's nothing wrong with using multiple object controllers, but it isn't necessary.)
_______________________________________________
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