Important: The information in this document is obsolete and should not be used for new development.
Handling Text
You can use the system software routines provided by TextEdit to greatly simplify basic text editing and formatting that your application would otherwise have to implement. For example, most applications use editable text items in dialog boxes; your application can use the Dialog Manager (which calls TextEdit) to automatically handle user interaction in editable text items. The Dialog Manager and your application can use TextEdit to insert new text, delete characters that the user backspaces over, scroll text within a window, cut text, copy text, paste text, select text, and handle word wrapping. Most applications use TextEdit only for simple text editing in a dialog box and use their own techniques for handling editable text in document windows.You should design your application so that it can handle text in more than one language or script. System software provides many routines to help you accomplish this. For example, if your application automatically displays the date in the footer of your document, you can use Text Utility routines to automatically display the date in the format common to the current script. Similarly, if your application provides a Find command, it can use Text Utility routines to search according to the word-break tables and according to the current script.
See Inside Macintosh: Text for information on how you can provide support for text editing in documents created by your application and for information on designing your application so that it can support text editing in more than one language or script.