Carbon


TXNRevert

Header: MacTextEditor.h Carbon status: Supported

Reverts to the last saved version of a document.

OSStatus TXNRevert (
    TXNObject iTXNObject
);
Parameter descriptions
iTXNObject

A variable of type TXNObject. Pass the text object for the active document.

function result

A result code. TXNRevert can also return File manager errors, paramErr, or noErr.

DISCUSSION

You can use the TXNRevert function with files that contain only text and files as well as files that were created entirely using MLTE. To revert to data that is embedded in a private file type, use the TXNSetSelection function to select all of the current data and then use the TXNSetDataFromFile function to read in the old data. If the file was not previously saved, the document reverts to an empty document.

AVAILABILITY

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


© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)