Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Text /
Chapter 2 - TextEdit / TextEdit Reference
Routines / Setting and Getting an Edit Record's Text and Character Attribute Information


TEGetText

The TEGetText function returns a handle to the text of the specified edit record.

FUNCTION TEGetText (hTE: TEHandle): CharsHandle; 
hTE
A handle to the edit record containing the text whose handle you want returned. You pass this handle as an input parameter.
CharsHandle
A handle to the text of the edit record.
DESCRIPTION
The TEGetText function doesn't make a copy of the text. Rather, it returns the handle to the text which is stored as a packed array of characters. (This handle belongs to TextEdit; your application must not destroy it.) The teLength field of the edit record contains the length of the text whose handle is returned.

The handle of type CharsHandle that is returned by TEGetText corresponds to the hText field of the edit record, but the data type is defined as follows:

TYPE  CharsHandle = ^CharsPtr;
      CharsPtr    = ^Chars;
      Chars       = PACKED ARRAY[0..32000] OF CHAR;

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996