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


GetRangeData

protoTXView:GetRangeData(range, which)

Returns a certain kind of data (text or styles) for the specified range in a word-processing view.

range
A frame with two slots: 'first and 'last. This frame defines a text range from 'first to 'last, inclusive. Each slot is required. The value of each slot must be a positive integer value.

which
Specifies the kind of data to retrieve. You can specify one of the following values:

Symbol Returned data

'text A string allocated from the NewtonScript heap.

'styles An array with two entries for each style run in the range. The first entry specifies the number of characters, and the second is either a font specification frame or a graphics specifiation frame. The run length is always 1 for graphics specification frames. For a description of the font specification frame, see the section "Font Frame" (8-18) in Newton Programmer's Guide. See "The Graphics Specification Frame" for a description of the graphics specification frame.

'rulers An array with two entries for each ruler. The first entry specifies the number of characters for the ruler, and the second contains a ruler information frame. See "The Ruler Information Frame" for a description of the ruler information frame.

'all Returns all information in a frame that contains three slots: 'text, 'styles, and 'rulers.

return value
A frame or array containing the requested data.

DISCUSSION

The *GetRangeData method returns data for a range of text within a word-processing view.


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