NSNumberFormatter

NSNumberFormatter Mac OS X 10.0

This concrete subclass of NSFormatter converts the numeric contents of a cell into a user-specified textual representation; textual representations can also be converted to NSDecimalNumber objects used to store numeric cell values.

figs/cocn_1372.gif

@interface NSNumberFormatter : NSFormatter
 // Accessor Methods
   - (void)setAttributedStringForNil:(NSAttributedString *)newAttributedString;
   - (NSAttributedString *)attributedStringForNil;
   - (void)setNegativeFormat:(NSString *)format;
   - (NSString *)negativeFormat;
   - (void)setMaximum:(NSDecimalNumber *)aMaximum;
   - (NSDecimalNumber *)maximum;
   - (void)setAllowsFloats:(BOOL)flag;
   - (BOOL)allowsFloats;
   - (void)setPositiveFormat:(NSString *)format;
   - (NSString *)positiveFormat;
   - (void)setMinimum:(NSDecimalNumber *)aMinimum;
   - (NSDecimalNumber *)minimum;
   - (void)setAttributedStringForZero:(NSAttributedString *)newAttributedString;
   - (NSAttributedString *)attributedStringForZero;
   - (void)setRoundingBehavior:(NSDecimalNumberHandler *)newRoundingBehavior;
   - (NSDecimalNumberHandler *)roundingBehavior;
   - (void)setFormat:(NSString *)format;
   - (NSString *)format;
   - (void)setHasThousandSeparators:(BOOL)flag;
   - (BOOL)hasThousandSeparators;
   - (void)setLocalizesFormat:(BOOL)flag;
   - (BOOL)localizesFormat;
   - (void)setDecimalSeparator:(NSString *)newSeparator;
   - (NSString *)decimalSeparator;
   - (void)setAttributedStringForNotANumber:(NSAttributedString *)newAttributedString;
   - (NSAttributedString *)attributedStringForNotANumber;
   - (void)setTextAttributesForNegativeValues:(NSDictionary *)newAttributes;
   - (NSDictionary *)textAttributesForNegativeValues;
   - (void)setTextAttributesForPositiveValues:(NSDictionary *)newAttributes;
   - (NSDictionary *)textAttributesForPositiveValues;
   - (void)setThousandSeparator:(NSString *)newSeparator;
   - (NSString *)thousandSeparator;



    Part II: API Quick Reference
    Chapter 13. Foundation Classes