Re: How to make text view treat colon as word boundary
Re: How to make text view treat colon as word boundary
- Subject: Re: How to make text view treat colon as word boundary
- From: Kyle Sluder <email@hidden>
- Date: Fri, 26 Jul 2013 08:15:39 -0700
On Thu, Jul 25, 2013, at 10:17 PM, Shane Stanley wrote:
> I have a text view that's used for editing code, and I want the user to
> be able to double-click within "foo:fie" and have only foo or fie
> selected. I overrode mouseDown: and mouseDragged: and thought I was home
> free -- but I now realise that's not going to work with completion.
>
> Changing the system setting to Computer locale isn't an option. I see
> Xcode actually does it differently depending on whether the double-click
> is inside a string literal or not. I don't see anything obvious -- any
> ideas?
Subclass NSTextView and override
-selectionRangeForProposedRange:granularity:. That should take care of
both mouse- and keyboard-based selection.
--Kyle Sluder
_______________________________________________
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