Instance Method

tokenField:representedObjectForEditingString:

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

Declaration

- (id)tokenField:(NSTokenField *)tokenField representedObjectForEditingString:(NSString *)editingString;

Parameters

tokenField

The token field that sent the message.

editingString

The edited string representation of a represented object.

Return Value

A represented object that is displayed rather than the editing string.

Discussion

If your application uses some object other than an NSString for their represented objects, you should return a new, autoreleased instance of that object from this method.

See Also

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:shouldAddObjects:atIndex:

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