Re: Other Word breaks ?
Re: Other Word breaks ?
- Subject: Re: Other Word breaks ?
- From: Douglas Davidson <email@hidden>
- Date: Fri, 3 May 2002 13:53:30 -0700
On Friday, May 3, 2002, at 04:27 AM, jerome LAURENS wrote:
AppKit understands "word$$$$" as a single word (try double click). How
can i change this behaviour such that only "word" is selected and no $
at all? In other words, how can I make $ a word separator?
The text system uses word boundaries for a number of things, such as
finding suitable line break positions in word wrap mode; setting
selections on double-clicks; and handling alt-arrow keys (move word
forward/backward etc.). There are some relevant methods defined in the
AppKit on NSAttributedString; look in the AppKit's NSAttributedString.h
for lineBreakBeforeIndex:withinRange:, doubleClickAtIndex:, and
nextWordFromIndex:forward:. For overriding purposes, depending on what
you wish to override, you may be better served by working at the
NSTextView level, with methods like
selectionRangeForProposedRange:granularity:. However, word breaking is
something that we have been working on for the next release of the
system, so you may wish to wait on this.
Douglas Davidson
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.