Files of this type and auxiliary type contain TextEdit-based documents.
With the advent of TextEdit for the IIGS, many small text-editing applications have suddenly appeared. Apple may wish to release such a utility with the System Software in the future, and has defined this simple file format for the use of such a utility (referred to as "Teach" after the Macintosh program "TeachText" by Bryan Stearns) and the use of any other text-editing program.
The file format is eminently suitable for a Text Edit record, and applications should feel free to save any Text Edit record using this file format. The auxiliary type is the ASCII letters "TE".
The data fork of a Teach document contains ASCII text. All 256 characters are allowed. The data fork should not contain anything that shouldn't be interpreted as ASCII text (for example, no data structures or pointers to lines, etc.).
The resource fork of a Teach document contains two resources. The first resource is of type rStyleBlock ($8012) and has ID $00000001. This resource contains all the style information for the text contained in the data fork. Each Teach document must contain this resource. Programs that use Teach documents may pass the resource ID $00000001 to TextEdit calls that require TEFormat data structures, which is the data structure contained in an rStyleBlock resource. If this resource does not exist, passing the ID to TextEdit could bring the system down.
The second resource is of type $7001 and has ID $00000001..This resource contains window position information. If the TextEdit record contains a ruler which is tied to the window position (so the text rewraps when the window is resized), when an application saves the record, it must include this resource. In the same respect, if this resource exists in a Teach file, an application must use this resource to set the window position and size.
Warning: If an application fails to follow either of these steps, TextEdit may hang.
The format of this second resource is as follows:
Other resources should not be placed in Teach documents. Any program saving a document could delete an older file with the same name instead of rewriting it, causing any other resources to be lost.
This and all of the other Apple II Technical Notes have been converted to HTML by Aaron Heiss as a public service to the Apple II community, with permission by Apple Computer, Inc. Any and all trademarks, registered and otherwise, are properties of their owners.