• 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
Bug in NSTextField?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug in NSTextField?


  • Subject: Bug in NSTextField?
  • From: Stephane Sudre <email@hidden>
  • Date: Mon, 20 Sep 2004 17:16:51 +0200

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.

IBtextField_ refers to the first NSTextField.

#import "MainController.h"

@implementation MainController

- (void) awakeFromNib
{
	[IBwindow_ makeFirstResponder:nil];

	[IBtextField_ setEditable:NO];

	[IBtextField_ setStringValue:@"fkjhsdf jksh"];
}

- (IBAction)action:(id)sender
{
	NSLog(@"toto");
}

@end

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.

Bug/problem observed from Mac OS X 10.2.8 (at least) to Mac OS X 10.3.5.

_______________________________________________
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


  • Follow-Ups:
    • Re: Bug in NSTextField?
      • From: Nicko van Someren <email@hidden>
  • Prev by Date: Re: -NSView setHidden: in 10.2
  • Next by Date: Re: Bindings: how to deal with canRemove ?
  • Previous by thread: Re: [NSMutableParagraphStyle setMinimumLineHeight] Confusion
  • Next by thread: Re: Bug in NSTextField?
  • Index(es):
    • Date
    • Thread