< Previous PageNext Page > Hide TOC

Displaying Cell Values

Every NSCell that displays text has a value associated with it. The NSCell object stores that value as an object of potentially any type, displays it as an NSString object, and returns it as a primary value or string object, according to what’s requested (intValue, floatValue, stringValue, and so on). Formatters are objects associated with NSCell objects (through setFormatter:) that translate a cell’s object value to its it textual representation and convert what users type into the underlying object. NSCell objects have built-in formatters to handle common string and numeric (int, float, double) translations. In addition, you can implement your own formatters to provide specialized object translation; see Data Formatting Programming Guide for Cocoa.

The text that an NSCell object displays and stores can be an attributed string. Several methods help to set and get attributed-string values, including setAttributedStringValue: and setImportsGraphics:.



< Previous PageNext Page > Hide TOC


© 2008 Apple Inc. All Rights Reserved. (Last updated: 2008-10-15)


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.