• 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
commitEditing not committing edits
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

commitEditing not committing edits


  • Subject: commitEditing not committing edits
  • From: Jonathan Fewtrell <email@hidden>
  • Date: Fri, 28 Jan 2005 09:50:42 +0000

I have half a dozen NSTextFields, all bound to a single NSMutableDictionary which is controlled by an NSObjectController. After entering/editing data in the fields, the user clicks a button to save the data to a file.

Initially my problem was that if the user did not tab out of a field or press Enter, the edits in the 'active' field would not be committed when the button was clicked. Based on comments in a number of threads here, I added a line to the button action to send a "commitEditing" message to the NSObjectController. I was confident this would work, but it didn't. What have I missed?

Not sure if this is relevant, but the button is a toggle type and its value is also bound to the same dictionary. The "enabled" state of each of the NSTextFields is bound to this key in the dictionary, with an NSNegateBoolean value transformer, so that the fields are disabled when the button is clicked and re-enabled when it is clicked again. I'm not sure if this disabling may somehow be preventing the "commitEditing" method from being performed.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: commitEditing not committing edits
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: A Question about cocoa-text.
  • Next by Date: Re: commitEditing not committing edits
  • Previous by thread: Re: Debugging Bindings
  • Next by thread: Re: commitEditing not committing edits
  • Index(es):
    • Date
    • Thread