Right. I figure though that asking for stringValue grabs the text from
the field editor, so why doesn't setEnabled do the same to commit
current editing? Seems logical to me. I can't imagine a situation
where you'd want text the user typed into a field to be ignored after
they already
Seems to me that this might be more to do with the responder chain.
The NSTextField will update its stringValue when it resigns as first
responder.
An NSButton does not accept first responder status so the NSTextField
never gets to resign first responder status.
If you are using
It really does not have anything to do with resigning first responder.
You can clearly ask for the string value while the text field is first
responder and get the correct answer back. What's happening is plainly
obvious, I just think it's a bug. (I filed a report. We'll see what
If a text field has focus, you type blah blah blah into it, and then
click a button which asks for its string value and disables the text
field, you get blah blah blah back.
If a text field has focus, you type blah blah blah into it, and then
click a button which disables the text field
I suspect it's because of the Field Editor. The text isn't really in
the field, it's in the shared field editor. If the field is disabled,
it won't be updated from the field editor because disabled means
refuse input. Also, it may be that when a control that is using the
field editor is