• 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: Default Button and NSTextView Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Default Button and NSTextView Problem (From: John Woodward <email@hidden>)

  • Prev by Date: repost: NSOutlineView question
  • Next by Date: Re: [NSEvent locationInWindow]
  • Previous by thread: Default Button and NSTextView Problem
  • Next by thread: How to select on a table with a control+click (right mouse click)
  • Index(es):
    • Date
    • Thread