• 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: vincent habchi <email@hidden>
  • Date: Thu, 2 Sep 2010 21:57:39 +0200

Le 2 sept. 2010 à 21:42, Stephane Sudre a écrit :

>
> 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.

You can add a delegate to your NSTextView that will intercept the proposed selection and shrink it. That's what I do with my custom SQL text view: it extends selections ending in the middle of a keyword to its end. What you try to do is somehow the contrary, but it should not be much more difficult.

Check: -(NSRange)textView: willChangeSelectionFromCharacterRange: toCharacterRange:

Vincent_______________________________________________

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

  • Prev by Date: [NSTextView] Is there a workaround for Snow Leopard new word selection behavior/bug?
  • Next by Date: Re: iTunes 10 UI
  • Previous by thread: [NSTextView] Is there a workaround for Snow Leopard new word selection behavior/bug?
  • Next by thread: Re: [NSTextView] Is there a workaround for Snow Leopard new word selection behavior/bug?
  • Index(es):
    • Date
    • Thread