• 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
selectText of NSTextField on focus
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

selectText of NSTextField on focus


  • Subject: selectText of NSTextField on focus
  • From: Richard Charles <email@hidden>
  • Date: Mon, 06 Jul 2015 10:15:52 -0600

I have a NSTextField subclass that selects all of the text when the user clicks it. This is accomplished by overriding becomeFirstResponder.

- (BOOL)becomeFirstResponder
{
    BOOL result = [super becomeFirstResponder];
    if(result) {
        [self performSelector:@selector(selectText:) withObject:self afterDelay:0];
    }
    return result;
}

http://stackoverflow.com/questions/2195704/selecttext-of-nstextfield-on-focus

This has worked perfectly for years until 10.10 Yosemite. Now when the user clicks into the text field nothing is selected.

Also the following error will often occur on 10.10 Yosemite when clicking on the text field.

2015-07-06 10:09:04.287 MyApp[727:15035] Bad cursor rect event, flags = 256

Does anyone have any insight into what is going on?

Thanks so much.

--Richard Charles


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: selectText of NSTextField on focus
      • From: Willeke <email@hidden>
    • Re: selectText of NSTextField on focus
      • From: Quincey Morris <email@hidden>
    • Re: selectText of NSTextField on focus
      • From: Richard Charles <email@hidden>
  • Prev by Date: Window size and location defaults
  • Next by Date: Re: selectText of NSTextField on focus
  • Previous by thread: Window size and location defaults
  • Next by thread: Re: selectText of NSTextField on focus
  • Index(es):
    • Date
    • Thread