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

Default Button and NSTextView Problem


  • Subject: Default Button and NSTextView Problem
  • From: John Woodward <email@hidden>
  • Date: Wed, 1 May 2002 21:41:06 -0400

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.
  • Follow-Ups:
    • Re: Default Button and NSTextView Problem
      • From: Jessica Kahn <email@hidden>
  • Prev by Date: Re: MenuItem tag
  • Next by Date: Re: Using pathnames with special characters
  • Previous by thread: Re: MenuItem tag
  • Next by thread: Re: Default Button and NSTextView Problem
  • Index(es):
    • Date
    • Thread