Re: Confirming NSTextField when a button is pressed
Re: Confirming NSTextField when a button is pressed
- Subject: Re: Confirming NSTextField when a button is pressed
- From: Fritz Anderson <email@hidden>
- Date: Mon, 15 Nov 2004 14:47:38 -0600
What you are seeing is the specified behavior of NSTextField -- it
doesn't acquire a new value until it has been finalized by an
end-editing key or by something else becoming first responder.
The generic way to fix this is to send makeFirstResponder: nil to your
window in the action method for your button.
If you are using controller bindings, the other way to do it is to send
commitEditing to the NSController in the action method.
-- F
On 11 Nov 2004, at 5:16 PM, Andrew White wrote:
Behaviour:
(1) Edit text field, hit return to confirm.
Edited text stays. controlTextDidEndEditing fires.
(2) Edit text field, click button.
Edited text replaced by prior text. controlTextDidEndEditing does not
fire. Button routine fires, but operates on wrong data since text
field value not correct.
What it looks like to me is that the temporary text view used for
editing is not getting flushed back to the text field when I click the
button. Why wouldn't that happen? Is this the correct behaviour?
_______________________________________________
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