Title Banner

Previous Book Contents Book Index Next

Newton Developer Technical Information: Newton Programmer's Guide: 2.1 OS Addendum /
Chapter 3 - Word Processing Views / Word Processing View Reference
Protos / protoTXView


GetWordRange

protoTXView:GetWordRange(offset)

Finds the first and last characters of a word.

offset
The offset from the beginning of the text in the word-processing view.

return value
A range frame that specifies the starting and ending offsets of the word that follows the specified offset in a word-processing view. The *GetWordRange method returns a range frame, as described in "The Range Frame". The *GetWordRange method returns nil if it does not find a word after offset.

DISCUSSION

The *GetWordRange method searches forward in the text to discover the first character and last character of the word that follows offset. This method considers a word to consist of alphanumeric characters delimited by white space (tabs, returns, spaces, and graphic runs). Hyphenated words are considered single words.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
26 APR 1997



Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help