#import <CPNumberFormatter.h>
Class Methods | |
(CPString) | + localizedStringFromNumber:numberStyle: |
Class Methods inherited from CPObject | |
(BOOL) | + accessInstanceVariablesDirectly |
(id) | + alloc |
(id) | + allocWithCoder: |
(BOOL) | + automaticallyNotifiesObserversForKey: |
(void) | + cancelPreviousPerformRequestsWithTarget: |
(void) | + cancelPreviousPerformRequestsWithTarget:selector:object: |
(Class) | + class |
(BOOL) | + conformsToProtocol: |
(void) | + exposeBinding: |
(void) | + initialize |
(IMP) | + instanceMethodForSelector: |
(BOOL) | + instancesImplementSelector: |
(BOOL) | + instancesRespondToSelector: |
(BOOL) | + isBindingExclusive: |
(BOOL) | + isSubclassOfClass: |
(CPSet) | + keyPathsForValuesAffectingValueForKey: |
(void) | + load |
(id) | + new |
(void) | + object:performSelector:withObject:afterDelay:inModes: |
(void) | + setVersion: |
(Class) | + superclass |
(int) | + version |
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.
|
implementation |
Synthesized accessor method.
Provided by category CPNumberFormatter(CPSynthesizedAccessors).
Definition at line 475 of file CPNumberFormatter.j.
|
implementation |
Synthesized accessor method.
Provided by category CPNumberFormatter(CPSynthesizedAccessors).
Definition at line 491 of file CPNumberFormatter.j.
|
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.
anObject | the object for which to return an editing string |
Reimplemented from CPFormatter.
Definition at line 184 of file CPNumberFormatter.j.
|
implementation |
Reimplemented from CPFormatter.
Provided by category CPNumberFormatter(CPCoding).
Definition at line 324 of file CPNumberFormatter.j.
|
implementation |
Synthesized accessor method.
Provided by category CPNumberFormatter(CPSynthesizedAccessors).
Definition at line 507 of file CPNumberFormatter.j.
|
implementation |
The default implementation of this method raises an exception.
When implementing a subclass, return by reference the object anObject after creating it from aString. Return YES
if the conversion is successful. If you return NO
, also return by reference (in anError) a localized user-presentable CPString object that explains the reason why the conversion failed; the delegate (if any) of the CPControl object can then respond to the failure in control:didFailToFormatString:errorDescription:. However, if anError is nil, the sender is not interested in the error description, and you should not attempt to assign one.
anObject | if conversion is successful, upon return contains the object created from the string |
aString | the string to parse. |
anError | if non-nil, if there is an error during the conversion, upon return contains an CPString object that describes the problem. |
YES
if the conversion from the string to a view content object was successful, otherwise NO
. Reimplemented from CPFormatter.
Definition at line 189 of file CPNumberFormatter.j.
|
implementation |
Synthesized accessor method.
Provided by category CPNumberFormatter(CPSynthesizedAccessors).
Definition at line 379 of file CPNumberFormatter.j.
|
implementation |
Initializes the receiver
Reimplemented from CPObject.
Definition at line 72 of file CPNumberFormatter.j.
|
implementation |
Reimplemented from CPFormatter.
Provided by category CPNumberFormatter(CPCoding).
Definition at line 300 of file CPNumberFormatter.j.
|
implementation |
Definition at line 160 of file CPNumberFormatter.j.
|
implementation |
Synthesized accessor method.
Provided by category CPNumberFormatter(CPSynthesizedAccessors).
Definition at line 459 of file CPNumberFormatter.j.
|
implementation |
Synthesized accessor method.
Provided by category CPNumberFormatter(CPSynthesizedAccessors).
Definition at line 427 of file CPNumberFormatter.j.
|
implementation |
Synthesized accessor method.
Provided by category CPNumberFormatter(CPSynthesizedAccessors).
Definition at line 443 of file CPNumberFormatter.j.
|
implementation |
Synthesized accessor method.
Provided by category CPNumberFormatter(CPSynthesizedAccessors).
Definition at line 411 of file CPNumberFormatter.j.
Definition at line 168 of file CPNumberFormatter.j.
|
implementation |
Synthesized accessor method.
Provided by category CPNumberFormatter(CPSynthesizedAccessors).
Definition at line 347 of file CPNumberFormatter.j.
|
implementation |
Synthesized accessor method.
Provided by category CPNumberFormatter(CPSynthesizedAccessors).
Definition at line 363 of file CPNumberFormatter.j.
|
implementation |
Synthesized accessor method.
Provided by category CPNumberFormatter(CPSynthesizedAccessors).
Definition at line 395 of file CPNumberFormatter.j.
|
implementation |
Synthesized accessor method.
Provided by category CPNumberFormatter(CPSynthesizedAccessors).
Definition at line 483 of file CPNumberFormatter.j.
|
implementation |
Synthesized accessor method.
Provided by category CPNumberFormatter(CPSynthesizedAccessors).
Definition at line 499 of file CPNumberFormatter.j.
|
implementation |
Synthesized accessor method.
Provided by category CPNumberFormatter(CPSynthesizedAccessors).
Definition at line 515 of file CPNumberFormatter.j.
|
implementation |
Synthesized accessor method.
Provided by category CPNumberFormatter(CPSynthesizedAccessors).
Definition at line 387 of file CPNumberFormatter.j.
|
implementation |
Synthesized accessor method.
Provided by category CPNumberFormatter(CPSynthesizedAccessors).
Definition at line 266 of file CPNumberFormatter.j.
|
implementation |
Synthesized accessor method.
Provided by category CPNumberFormatter(CPSynthesizedAccessors).
Definition at line 254 of file CPNumberFormatter.j.
|
implementation |
Synthesized accessor method.
Provided by category CPNumberFormatter(CPSynthesizedAccessors).
Definition at line 260 of file CPNumberFormatter.j.
|
implementation |
Synthesized accessor method.
Provided by category CPNumberFormatter(CPSynthesizedAccessors).
Definition at line 248 of file CPNumberFormatter.j.
|
implementation |
Synthesized accessor method.
Provided by category CPNumberFormatter(CPSynthesizedAccessors).
Definition at line 222 of file CPNumberFormatter.j.
|
implementation |
Synthesized accessor method.
Provided by category CPNumberFormatter(CPSynthesizedAccessors).
Definition at line 371 of file CPNumberFormatter.j.
|
implementation |
Synthesized accessor method.
Provided by category CPNumberFormatter(CPSynthesizedAccessors).
Definition at line 242 of file CPNumberFormatter.j.
|
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.)
anObject | The object for which a textual representation is returned |
Reimplemented from CPFormatter.
Definition at line 176 of file CPNumberFormatter.j.
Definition at line 92 of file CPNumberFormatter.j.