Protocol

NSTokenFieldDelegate

A set of optional methods implemented by delegates of NSTokenField objects.

Declaration

@protocol NSTokenFieldDelegate

Topics

Displaying Tokenized Strings

- tokenField:displayStringForRepresentedObject:

Allows the delegate to provide a string to be displayed as a proxy for the given represented object.

- tokenField:styleForRepresentedObject:

Allows the delegate to return the token style for editing the specified represented object.

Editing a Tokenized Strings

- tokenField:completionsForSubstring:indexOfToken:indexOfSelectedItem:

Allows the delegate to provide an array of appropriate completions for the contents of the receiver.

- tokenField:editingStringForRepresentedObject:

Allows the delegate to provide a string to be edited as a proxy for a represented object.

- tokenField:representedObjectForEditingString:

Allows the delegate to provide a represented object for the given editing string.

- tokenField:shouldAddObjects:atIndex:

Allows the delegate to validate the tokens to be added to the receiver at a particular location.

Reading To and Writing From the Pasteboard

- tokenField:readFromPasteboard:

Allows the delegate to return an array of objects representing the data read from the specified pasteboard.

- tokenField:writeRepresentedObjects:toPasteboard:

Sent so the delegate can write represented objects to the pasteboard corresponding to a given array of display strings.

Managing Menus for Represented Objects

- tokenField:hasMenuForRepresentedObject:

Allows the delegate to specify whether the given represented object provides a menu.

- tokenField:menuForRepresentedObject:

Allows the delegate to provide a menu for the specified represented object.

Relationships

Inherits From