Chapter 15: Working with Text and Documents
In This Chapter
Creating multi-document applications
Implementing undo and redo
Supporting other languages
Cocoa includes classes that implement powerful multi-language text features and drastically simplify the design of documents that support styled and formatted text. An associated Xcode template makes it easy to create an application that supports multiple editing windows. Each window is an instance of a customizable MyDocument class, which is a subclass of NSDocument — Cocoa's document object. You can define the look and feel of this class, by customizing its associated nib, and add custom code to implement saving and loading features for customized and existing file formats.
NSString is Cocoa's string-handling class. It supports a vast library of methods that can initialize, convert, compare, split, combine, and process string data.
NSString objects are read-only. You can create edited strings by copying the output of one of the string-processing methods to a new string. You can also use NSMutableString, which implements insert, delete, and replace methods.
Table 15.1 lists ...