Re: NSNumberFormatter documentation error?
Re: NSNumberFormatter documentation error?
- Subject: Re: NSNumberFormatter documentation error?
- From: Keary Suska <email@hidden>
- Date: Sat, 30 Jul 2011 11:18:14 -0600
On Jul 30, 2011, at 9:09 AM, Andre Masse wrote:
> According to the NSNumberFormatter documentation:
>
> setGeneratesDecimalNumbers:
> Controls whether the receiver creates instances of NSDecimalNumber when it converts strings to number objects.
>
> - (void)setGeneratesDecimalNumbers:(BOOL)flag
> Parameters
> flag
> YES if the receiver should generate NSDecimalNumber instances, NO if it should generate NSNumber instances.
> Discussion
> The default is YES.
>
> Dragging an NSNumberFormatter object in XCode 4.1, choosing "Mac OS X 10.4 + Default" and "Decimal" in the popup menus generate the following error at runtime when using values entered by the user in a tableview'cell:
>
> -[__NSCFNumber decimalNumberByMultiplyingBy:]: unrecognized selector sent to instance 0x1067f3260
>
> You have to choose "Mac OS X 10.4 + Custom" and select the checkbox "Generate Decimal Numbers". It looks like the default is "NO".
>
> Do I misinterpret the documentation or should I file a bug on radar?
It's not a matter of misinterpretation per se. The documentation reflects the API, and would apply only to objects you create in your own code. Interface Builder may choose to have its own defaults for objects created by it, and those choices would not be documented by the API, but may be documented by IB-specific documentation. If there is no such IB-specific documentation (which is possible), I would only file a radar that Apple have specific documentation on object defaults in Interface Builder.
HTH,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden