Developer Documentation
PATH  Mac OS X Documentation > Making Your Applications Scriptable

Making Your Applications Scriptable

Previous | Chapter contents | Book PDF

Access the Text Suite

Overview

The text objects (particularly NSTextStorage) in the Application Kit export scriptable APIs defined in the Text suite. (See " Text Suite " for more information.) Scripts can thus request or select textual elements at different levels of granularity: character, word, paragraph, and entire body of text. Applications automatically acquire this scriptability if they acquire access to a NSTextStorage object through their container hierarchy.

What You Must Do

To acquire text scriptability, drag a text object from Interface Builder's DataViews palette into your application's user interface. Alternatively, your program can programmatically create a text object.


Making Your Applications Scriptable

Previous | Chapter contents | Book PDF