Re: Manually updating a data bound value of a bound text field
Re: Manually updating a data bound value of a bound text field
- Subject: Re: Manually updating a data bound value of a bound text field
- From: Ken Thomases <email@hidden>
- Date: Thu, 18 Jun 2009 11:33:23 -0500
On Jun 18, 2009, at 11:17 AM, Ramakrishna Vavilala wrote:
Unfortunately, I used incorrect design by binding text field to
properties of the file's owner (which happens to be a
NWindowController) which does not respond to commitEditing message.
Any other ideas?
Fix the design? It should be relatively easy to interpose an
NSObjectController in between and adjust your bindings.
Alternatively, you can directly invoke one of the commitEditing...
methods on the text field, but you should only invoke it if you know
that the text field is editing. To learn that, you'd have to make the
bound-to object (File's Owner) conform to NSEditorRegistration so that
the text field (and any other editors) can inform it when it's
editing. This is essentially re-implementing a part of what
NSController-derived classes would do for you. That seems like a lot
of unnecessary work to me.
Regards,
Ken
_______________________________________________
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