Re: Bug in NSTextField?
Re: Bug in NSTextField?
- Subject: Re: Bug in NSTextField?
- From: Nicko van Someren <email@hidden>
- Date: Mon, 20 Sep 2004 17:00:52 +0100
On 20 Sep 2004, at 16:16, Stephane Sudre wrote:
I have the following situation:
2 NSTextFields in a NSWindow.
First NSTextField was created using an editable text field and is
linked to action 'action' with target a MainController instance.
Second NSTextField was created using a label text field which was set
to be selectable.
...
If I select the text in the First NSTextField and then click on the
second text field, action is called.
If I add a breakpoint in action, I can see that the action is
triggered by:
[NSTextField textDidEndEditing:];
but the NSTextField is supposed to be not editable. So how can it end
editing?
This is a bit problematic if you don't want the action to be called
when the NSTextField is not editable.
There is certainly an argument that this is a bug. You can get around
it by setting the text field to only send an action when the user hits
return whenever you set it as not editable (or indeed always setting
that, since it's usually what the user expects).
Nicko
_______________________________________________
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