• 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: [NSTextView] Is there a workaround for Snow Leopard new word selection behavior/bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [NSTextView] Is there a workaround for Snow Leopard new word selection behavior/bug?


  • Subject: Re: [NSTextView] Is there a workaround for Snow Leopard new word selection behavior/bug?
  • From: Ken Thomases <email@hidden>
  • Date: Thu, 2 Sep 2010 16:06:29 -0500

On Sep 2, 2010, at 2:42 PM, Stephane Sudre wrote:

> I need to detect double-click on a word when the alt key is hold down
> (to do something similar to what Xcode does).

> This does not work as well in Mac OS X 10.6.
>
> Because when you double-click on the word myclass in a text like this:
>
> myclass.mymethod
>
> this selects myclass.mymethod.
>
> On previous OS versions, only myclass was selected.

This is a distinction between the U.S. and U.S. (Computer) regions in the Formats tab of the Language & Text pane of System Preferences.

This affects the -doubleClickAtIndex: and -nextWordFromIndex:forward: methods of NSAttributedString (and its subclass NSTextStorage).  It may be possible to set up your text view to use a custom subclass of NSTextStorage that overrides the behavior of those methods.

Cheers,
Ken

_______________________________________________

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

References: 
 >[NSTextView] Is there a workaround for Snow Leopard new word selection behavior/bug? (From: Stephane Sudre <email@hidden>)

  • Prev by Date: Re: [NSTextView] Is there a workaround for Snow Leopard new word selection behavior/bug?
  • Next by Date: Re: CALayer -drawInContext and GCD
  • Previous by thread: Re: [NSTextView] Is there a workaround for Snow Leopard new word selection behavior/bug?
  • Next by thread: Core Data fetch performance, design pattern sought
  • Index(es):
    • Date
    • Thread