Using NSTokenField

Last Revision:
Version 1.0, 2013-02-15
"Tokens" demonstrates how to use the NSTokenField class. An NSTokenField is a text field containing tokens as its content.
Build Requirements:
Xcode 4.5 later, OS X 10.8 or later
Runtime Requirements:
OS X 10.7 or later

"Tokens" demonstrates how to use the NSTokenField class. An NSTokenField is a text field containing tokens as its content. A token represents a string or other object. A token’s distinctive form makes it easy for users to recognize and manipulate it. Sometimes users select the string to be tokenized from a list of possible entries presented to them, such as the list of email addresses.

The sample demonstrates the following: - Explains how to configure token fields and connect them to other objects in an application. - Displays a completion list and describes how to display a list of possible completions for the currently entered substring. - Returns represented objects and shows how to return an array of represented objects for the tokens in a token field. - Implements menus for each token, allowing the user to change the token's value. - Allows tokens to be draggable within the text field, by using NSCoder for encoding and decoding.