| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/AppKit.framework |
| Availability | Available in Mac OS X v10.4 and later. |
| Companion guide | |
| Declared in | NSTokenField.h |
NSTokenField is a subclass of NSTextField that provides tokenized editing similar to the address field in the Mail application.
NSTokenField uses an NSTokenFieldCell to implement much of the control’s functionality. NSTokenField provides cover methods for most methods of NSTokenFieldCell, which invoke the corresponding cell method.
NSCoding. Starting with Mac OS X v10.5, they no longer need to.In Mac OS X v10.4, NSTokenField trims whitespace around tokens but it does not trim whitespace in Mac OS X versions 10.5.0 and 10.5.1. In Mac OS X v10.5.2, you get whitespace-trimming behavior by either linking against the v10.4 binary or linking against the v10.5 binary and not implementing the tokenField:representedObjectForEditingString: method. If you do not want the whitespace-trimming behavior, link against the v10.5 binary and implement this method, returning the editing string if you have no represented object.
Returns the default completion delay.
+ (NSTimeInterval)defaultCompletionDelay
The default completion delay is 0.
NSTokenField.hReturns the default tokenizing character set.
+ (NSCharacterSet *)defaultTokenizingCharacterSet
The default tokenizing character set is “,”.
NSTokenField.hReturns the receiver’s completion delay.
- (NSTimeInterval)completionDelay
NSTokenField.hReturns the token field’s delegate.
- (id < NSTokenFieldDelegate >)delegate
The token field’s delegate
NSTokenField.hSets the receiver’s completion delay.
- (void)setCompletionDelay:(NSTimeInterval)delay
NSTokenField.hSets the token field’s delegate
- (void)setDelegate:(id < NSTokenFieldDelegate >)anObject
The delegate for the receiver. The delegate must conform to the NSTokenFieldDelegate Protocol protocol.
NSTokenField.hSets the recevier’s tokenizing character set to characterSet.
- (void)setTokenizingCharacterSet:(NSCharacterSet *)characterSet
NSTokenField.hReturns the token style of the receiver.
- (void)setTokenStyle:(NSTokenStyle)style
NSTokenField.hReturns the receiver’s tokenizing character set.
- (NSCharacterSet *)tokenizingCharacterSet
NSTokenField.hReturns the receiver’s token style.
- (NSTokenStyle)tokenStyle
NSTokenField.hLast updated: 2009-05-24