Bug in NSTextField?
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