commitEditing not committing edits
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