• 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: Other Word breaks ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Other Word breaks ? (From: jerome LAURENS <email@hidden>)

  • Prev by Date: Re: New features in cocoa.mamasam.com
  • Next by Date: Re: Screen capture?
  • Previous by thread: Other Word breaks ?
  • Next by thread: Re: Word breaks ?
  • Index(es):
    • Date
    • Thread