Re: Altering Cocoa Text Word Breaking
Re: Altering Cocoa Text Word Breaking
- Subject: Re: Altering Cocoa Text Word Breaking
- From: Douglas Davidson <email@hidden>
- Date: Fri, 21 Oct 2005 09:48:11 -0700
On Oct 21, 2005, at 8:22 AM, Mark Alldritt wrote:
Does anyone know how to alter Cocoa Text's word breaking rules? I
have
found that under tiger, double clicking on hello:word selects both
words.
In my code editor, this isn't appropriate. Interestingly, this
changed
between Panther and Tiger.
This can be controlled at the NSTextView level, by subclassing and
overriding -selectionRangeForProposedRange:granularity:, or at the
NSTextStorage level, by subclassing and overriding
doubleClickAtIndex:. The default rules are based on standard Unicode
algorithms, which may not be appropriate for contexts other than
natural-language text.
Douglas Davidson
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden