It's a good solution if you need in which direction you need to shrink the selection. But I can't know that.
On Thu, Sep 2, 2010 at 12:57 PM, vincent habchi <vi...@macports.org> wrote: > 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 (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com