A method identified as deprecated has been superseded and may become unsupported in the future.
Returns the type of data the user can type into the receiver. (Deprecated in Mac OS X v10.0 and later. Use a formatter instead—see setFormatter:
.)
- (NSInteger)entryType
One of the types listed for this method in “Data Entry Types”
. If the receiver is not a text-type cell, or if no type has been set, NSAnyType
is returned.
NSCell.h
Sets how numeric data is formatted in the receiver and places restrictions on acceptable input. (Deprecated in Mac OS X v10.0 and later. Use a formatter instead—see setFormatter:
.)
- (void)setEntryType:(NSInteger)aType
One of the types listed for this method in “Data Entry Types”
.
The formatter associated with the receiver is replaced with a newly instantiated formatter appropriate to the entry type.
If the receiver isn’t a text-type cell, this method converts it to one; in the process, it changes its title to “Cell” and sets its font to the user’s system font at 12 points.
You can check whether formatted strings conform to the entry types of cells with the isEntryAcceptable:
method. NSControl
subclasses also use isEntryAcceptable:
to validate what users have typed in editable cells. You can control the format of values accepted and displayed in cells by creating a custom subclass of NSFormatter
and associating an instance of that class with cells (through setFormatter:
). In custom NSCell
subclasses, you can also override isEntryAcceptable:
to check for the validity of data entered into cells.
NSCell.h
© 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-02-04)