• 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: How to make text view treat colon as word boundary
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: How to make text view treat colon as word boundary
      • From: Shane Stanley <email@hidden>
    • Re: How to make text view treat colon as word boundary
      • From: Shane Stanley <email@hidden>
References: 
 >How to make text view treat colon as word boundary (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Leak when "drawing too fast"
  • Next by Date: Re: Leak when "drawing too fast"
  • Previous by thread: How to make text view treat colon as word boundary
  • Next by thread: Re: How to make text view treat colon as word boundary
  • Index(es):
    • Date
    • Thread