< Previous PageNext Page > Hide TOC

Deprecated NSCell Methods

A method identified as deprecated has been superseded and may become unsupported in the future.

Deprecated in Mac OS X v10.0 and later

entryType

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

Return Value

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.

Availability
See Also
Declared In
NSCell.h

setEntryType:

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

Parameters
aType

One of the types listed for this method in “Data Entry Types”.

Discussion

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.

Availability
See Also
Declared In
NSCell.h

< Previous PageNext Page > Hide TOC


© 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-02-04)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.