• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Manually updating a data bound value of a bound text field
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Manually updating a data bound value of a bound text field
      • From: Ramakrishna Vavilala <email@hidden>
References: 
 >Manually updating a data bound value of a bound text field (From: Ramakrishna Vavilala <email@hidden>)
 >Re: Manually updating a data bound value of a bound text field (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: Manually updating a data bound value of a bound text field
  • Next by Date: Re: MDSchemaCopyAllAttributes() returning nil
  • Previous by thread: Re: Manually updating a data bound value of a bound text field
  • Next by thread: Re: Manually updating a data bound value of a bound text field
  • Index(es):
    • Date
    • Thread