• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Bug in NSTextField?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Bug in NSTextField? (From: Stephane Sudre <email@hidden>)

  • Prev by Date: Re: Subclassing NSDateFormatter problem
  • Next by Date: Re: Subclassing NSDateFormatter problem
  • Previous by thread: Bug in NSTextField?
  • Next by thread: Subclassing NSDateFormatter problem
  • Index(es):
    • Date
    • Thread