Carbon


TEGetText

Header: TextEdit.h Carbon status: Not Recommended

Returns a handle to the text of the specified edit structure.

CharsHandle TEGetText (
    TEHandle hTE
);
Parameter descriptions
hTE

A handle to the edit structure containing the text whose handle you want returned. You pass this handle as an input parameter.

function result

A handle to the text contained in the specified edit structure.

DISCUSSION

Given an edit structure that contains text, you can use the TEGetText function to get a handle to the text itself. 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 structure 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 TERec structure.

AVAILABILITY

Not recommended in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)