API  0.9.6
 All Classes Files Functions Variables Macros Modules Pages
CPNumberFormatter Class Reference

#import <CPNumberFormatter.h>

+ Inheritance diagram for CPNumberFormatter:

Instance Methods

(CPString- currencyCode
 
(CPString- currencySymbol
 
(CPString- editingStringForObjectValue:
 
(void) - encodeWithCoder:
 
(BOOL) - generatesDecimalNumbers
 
(BOOL) - getObjectValue:forString:errorDescription:
 
(CPString- groupingSeparator
 
(id) - init
 
(id) - initWithCoder:
 
(CPUInteger) - maximumFractionDigits
 
(CPUInteger) - minimumFractionDigits
 
(CPNumber- numberFromString:
 
(CPNumberFormatterStyle) - numberStyle
 
(CPString- perMillSymbol
 
(CPNumberFormatterRoundingMode) - roundingMode
 
(void) - setCurrencyCode:
 
(void) - setCurrencySymbol:
 
(void) - setGeneratesDecimalNumbers:
 
(void) - setGroupingSeparator:
 
(void) - setMaximumFractionDigits:
 
(void) - setMinimumFractionDigits:
 
(void) - setNumberStyle:
 
(void) - setPerMillSymbol:
 
(void) - setRoundingMode:
 
(CPString- stringForObjectValue:
 
(CPString- stringFromNumber:
 
- Instance Methods inherited from CPFormatter
(BOOL) - getObjectValue:forString:errorDescription:
 
(BOOL) - isPartialStringValid:newEditingString:errorDescription:
 
(BOOL) - isPartialStringValid:proposedSelectedRange:originalString:originalSelectedRange:errorDescription:
 
- Instance Methods inherited from CPObject
(void) - addObserver:forKeyPath:options:context:
 
(void) - applyChange:toKeyPath:
 
(id) - autorelease
 
(id) - awakeAfterUsingCoder:
 
(void) - awakeFromCib
 
(void) - bind:toObject:withKeyPath:options:
 
(Class) - classForCoder
 
(Class) - classForKeyedArchiver
 
(CPString- className
 
(id) - copy
 
(void) - dealloc
 
(CPString- description
 
(CPDictionary- dictionaryWithValuesForKeys:
 
(void) - didChange:valuesAtIndexes:forKey:
 
(void) - didChangeValueForKey:
 
(void) - didChangeValueForKey:withSetMutation:usingObjects:
 
(void) - doesNotRecognizeSelector:
 
(CPArray- exposedBindings
 
(id) - forwardingTargetForSelector:
 
(void) - forwardInvocation:
 
(unsigned) - hash
 
(BOOL) - implementsSelector:
 
(CPDictionary- infoForBinding:
 
(BOOL) - isEqual:
 
(BOOL) - isKindOfClass:
 
(BOOL) - isMemberOfClass:
 
(BOOL) - isProxy
 
(IMP) - methodForSelector:
 
(CPMethodSignature) - methodSignatureForSelector:
 
(id) - mutableArrayValueForKey:
 
(id) - mutableArrayValueForKeyPath:
 
(id) - mutableCopy
 
(id) - mutableSetValueForKey:
 
(id) - mutableSetValueForKeyPath:
 
(id) - performSelector:
 
(id) - performSelector:withObject:
 
(id) - performSelector:withObject:withObject:
 
(id) - performSelector:withObjects:
 
(void) - release
 
(void) - removeObserver:forKeyPath:
 
(id) - replacementObjectForArchiver:
 
(id) - replacementObjectForCoder:
 
(id) - replacementObjectForKeyedArchiver:
 
(BOOL) - respondsToSelector:
 
(id) - retain
 
(id) - self
 
(void) - setValue:forKey:
 
(void) - setValue:forKeyPath:
 
(void) - setValue:forUndefinedKey:
 
(void) - setValuesForKeysWithDictionary:
 
(CPString- UID
 
(void) - unbind:
 
(Class) - valueClassForBinding:
 
(id) - valueForKey:
 
(id) - valueForKeyPath:
 
(id) - valueForUndefinedKey:
 
(void) - willChange:valuesAtIndexes:forKey:
 
(void) - willChangeValueForKey:
 
(void) - willChangeValueForKey:withSetMutation:usingObjects:
 

Additional Inherited Members

- Class Methods inherited from CPObject
(BOOL) + accessInstanceVariablesDirectly
 
(id) + alloc
 
(id) + allocWithCoder:
 
(BOOL) + automaticallyNotifiesObserversForKey:
 
(Class) + class
 
(void) + exposeBinding:
 
(void) + initialize
 
(IMP) + instanceMethodForSelector:
 
(BOOL) + instancesRespondToSelector:
 
(BOOL) + isSubclassOfClass:
 
(CPSet+ keyPathsForValuesAffectingValueForKey:
 
(void) + load
 
(id) + new
 
(void) + setVersion:
 
(Class) + superclass
 
(int) + version
 
- Instance Variables inherited from CPObject
Class isa
 

Detailed Description

CPNumberFormatter takes a numeric CPNumber value and formats it as text for display. It also supports the converse, taking text and interpreting it as a CPNumber by configurable formatting rules.

Definition at line 2 of file CPNumberFormatter.h.

Method Documentation

- (CPString) currencyCode
implementation

Synthesized accessor method.

Provided by category CPNumberFormatter(CPSynthesizedAccessors).

Definition at line 367 of file CPNumberFormatter.j.

- (CPString) currencySymbol
implementation

Synthesized accessor method.

Provided by category CPNumberFormatter(CPSynthesizedAccessors).

Definition at line 383 of file CPNumberFormatter.j.

- (CPString) editingStringForObjectValue: (id)  anObject
implementation

The default implementation of this method invokes stringForObjectValue:.

When implementing a subclass, override this method only when the string that users see and the string that they edit are different. In your implementation, return an CPString object that is used for editing, following the logic recommended for implementing stringForObjectValue:. As an example, you would implement this method if you want the dollar signs in displayed strings removed for editing.

Parameters
anObjectthe object for which to return an editing string
Returns
CPString object that is used for editing the textual representation of an object

Reimplemented from CPFormatter.

Definition at line 167 of file CPNumberFormatter.j.

- (void) encodeWithCoder: (CPCoder aCoder
implementation

Reimplemented from CPFormatter.

Provided by category CPNumberFormatter(CPCoding).

Definition at line 250 of file CPNumberFormatter.j.

- (BOOL) generatesDecimalNumbers
implementation

Synthesized accessor method.

Provided by category CPNumberFormatter(CPSynthesizedAccessors).

Definition at line 399 of file CPNumberFormatter.j.

- (BOOL) getObjectValue: (id)  anObject
forString: (CPString aString
errorDescription: (CPString anError 
implementation

Definition at line 172 of file CPNumberFormatter.j.

- (CPString) groupingSeparator
implementation

Synthesized accessor method.

Provided by category CPNumberFormatter(CPSynthesizedAccessors).

Definition at line 303 of file CPNumberFormatter.j.

- (id) init
implementation

Initializes the receiver

Returns
the initialized receiver

Reimplemented from CPObject.

Definition at line 70 of file CPNumberFormatter.j.

- (id) initWithCoder: (CPCoder aCoder
implementation

Reimplemented from CPFormatter.

Provided by category CPNumberFormatter(CPCoding).

Definition at line 231 of file CPNumberFormatter.j.

- (CPUInteger) maximumFractionDigits
implementation

Synthesized accessor method.

Provided by category CPNumberFormatter(CPSynthesizedAccessors).

Definition at line 351 of file CPNumberFormatter.j.

- (CPUInteger) minimumFractionDigits
implementation

Synthesized accessor method.

Provided by category CPNumberFormatter(CPSynthesizedAccessors).

Definition at line 335 of file CPNumberFormatter.j.

- (CPNumber) numberFromString: (CPString aString
implementation

Definition at line 151 of file CPNumberFormatter.j.

- (CPNumberFormatterStyle) numberStyle
implementation

Synthesized accessor method.

Provided by category CPNumberFormatter(CPSynthesizedAccessors).

Definition at line 271 of file CPNumberFormatter.j.

- (CPString) perMillSymbol
implementation

Synthesized accessor method.

Provided by category CPNumberFormatter(CPSynthesizedAccessors).

Definition at line 287 of file CPNumberFormatter.j.

- (CPNumberFormatterRoundingMode) roundingMode
implementation

Synthesized accessor method.

Provided by category CPNumberFormatter(CPSynthesizedAccessors).

Definition at line 319 of file CPNumberFormatter.j.

- (void) setCurrencyCode: (CPString aValue
implementation

Synthesized accessor method.

Provided by category CPNumberFormatter(CPSynthesizedAccessors).

Definition at line 375 of file CPNumberFormatter.j.

- (void) setCurrencySymbol: (CPString aValue
implementation

Synthesized accessor method.

Provided by category CPNumberFormatter(CPSynthesizedAccessors).

Definition at line 391 of file CPNumberFormatter.j.

- (void) setGeneratesDecimalNumbers: (BOOL)  aValue
implementation

Synthesized accessor method.

Provided by category CPNumberFormatter(CPSynthesizedAccessors).

Definition at line 407 of file CPNumberFormatter.j.

- (void) setGroupingSeparator: (CPString aValue
implementation

Synthesized accessor method.

Provided by category CPNumberFormatter(CPSynthesizedAccessors).

Definition at line 311 of file CPNumberFormatter.j.

- (void) setMaximumFractionDigits: (CPUInteger)  aNumber
implementation

Synthesized accessor method.

Provided by category CPNumberFormatter(CPSynthesizedAccessors).

Definition at line 212 of file CPNumberFormatter.j.

- (void) setMinimumFractionDigits: (CPUInteger)  aNumber
implementation

Synthesized accessor method.

Provided by category CPNumberFormatter(CPSynthesizedAccessors).

Definition at line 206 of file CPNumberFormatter.j.

- (void) setNumberStyle: (CPNumberFormatterStyle)  aStyle
implementation

Synthesized accessor method.

Provided by category CPNumberFormatter(CPSynthesizedAccessors).

Definition at line 181 of file CPNumberFormatter.j.

- (void) setPerMillSymbol: (CPString aValue
implementation

Synthesized accessor method.

Provided by category CPNumberFormatter(CPSynthesizedAccessors).

Definition at line 295 of file CPNumberFormatter.j.

- (void) setRoundingMode: (CPNumberFormatterRoundingMode)  aRoundingMode
implementation

Synthesized accessor method.

Provided by category CPNumberFormatter(CPSynthesizedAccessors).

Definition at line 200 of file CPNumberFormatter.j.

- (CPString) stringForObjectValue: (id)  anObject
implementation

The default implementation of this method raises an exception.

When implementing a subclass, return the CPString object that textually represents the view's object for display and if editingStringForObjectValue: is unimplemented for editing. First test the passed-in object to see if it's of the correct class. If it isn't, return nil; but if it is of the right class, return a properly formatted and, if necessary, localized string. (See the specification of the CPString class for formatting and localizing details.)

Parameters
anObjectThe object for which a textual representation is returned
Returns
CPSting a formatted string

Reimplemented from CPFormatter.

Definition at line 159 of file CPNumberFormatter.j.

- (CPString) stringFromNumber: (CPNumber number
implementation

Definition at line 88 of file CPNumberFormatter.j.


The documentation for this class was generated from the following files: