• 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
[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]

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


  • Subject: [NSTextView] Is there a workaround for Snow Leopard new word selection behavior/bug?
  • From: Stephane Sudre <email@hidden>
  • Date: Thu, 2 Sep 2010 12:42:45 -0700

Case:
-----

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

To do this I subclassed NSTextView and implemented a custom the
mouseDown: method (that calls the super method, don't panic).

This works fine on Mac OS X 10.4.x and 10.5.x.

Problem:
--------

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.

Question:
---------

Is there a way to revert to the previous/right behavior?

I looked in the documentation which is full of set/is methods but not
the one I'm looking for as far as I can tell.
_______________________________________________

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: Ken Thomases <email@hidden>
    • Re: [NSTextView] Is there a workaround for Snow Leopard new word selection behavior/bug?
      • From: vincent habchi <email@hidden>
  • Prev by Date: Re: CALayer -drawInContext and GCD
  • Next by Date: Re: [NSTextView] Is there a workaround for Snow Leopard new word selection behavior/bug?
  • Previous by thread: Re: CALayer -drawInContext and GCD
  • Next by thread: Re: [NSTextView] Is there a workaround for Snow Leopard new word selection behavior/bug?
  • Index(es):
    • Date
    • Thread