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: Andrew White <email@hidden>
- Date: Fri, 12 Nov 2004 10:16:18 +1100
Daniel Todd Currie wrote:
If you want to execute something before processing a click, you'll
probably have to subclass the NSButton and override the -mouseDown:
method. However, I suspect there is an easier way to do what you want.
Perhaps if you were more clear on what you are trying to accomplish...
Perhaps I didn't explain myself very well.
Window contains two elements:
Text field (TF)
Button (BN)
BN is connected to an action in the window controller.
The text field has the window controller as a delegate for
controlTextDidEndEditing.
No other custom overrides.
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?
--
Andrew White
_______________________________________________
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