Re: Default Button and NSTextView Problem
Re: Default Button and NSTextView Problem
- Subject: Re: Default Button and NSTextView Problem
- From: Jessica Kahn <email@hidden>
- Date: Wed, 1 May 2002 20:48:50 -0700
I believe this is a known AppKit bug. The workaround involves calling -[NSWindow enableKeyEquivalentForDefaultButtonCell], but when exactly one should do this, I'm not sure (it doesn't say in the bug report). Sorry to be only marginally helpful.
--Jess
On Wednesday, May 1, 2002, at 06:41 PM, John Woodward wrote:
I have a simple window with a single NSTextView and an OK button, set in IB to have a key equivalent of \r, making it the default button. My main class awakeFromNib code is:
- (void) awakeFromNib
{
[text setString:@"This could be any text."]; // put text in NSTextView
[mainWindow makeKeyAndOrderFront:nil];
}
If, when this window appears, I press RETURN, the OK button works. If I select some text in the NSTextView and then press RETURN, the OK button does not work. The NSTextView is not editable (in IB), but is selectable. Shouldn't the OK button work in this case? What am I missing?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.