On Sat, Dec 11, 2010 at 5:58 PM, WT <jrca...@gmail.com> wrote:
> [wrt NSNumberFormatter] However, setUsesGroupingSeparator:YES still has no 
> effect for me.
>
> May I send you (off-list) the test project?

For those following along at home, this happens to be an iOS project.
I did this and it seems to work for me:


- (NSNumberFormatter*) numberFormatter
{
    if (numberFormatter_ == nil)
    {
         numberFormatter_ = [[NSNumberFormatter alloc] init];

        [numberFormatter_ setLocale: self.localePtBr];
        [numberFormatter_ setUsesGroupingSeparator: YES];
        [numberFormatter_ setNumberStyle:NSNumberFormatterDecimalStyle];
    }

    return numberFormatter_;
}

Looks like on iOS the setNumberStyle: call is required to get it to
properly handle the grouping separator, while on OS X it isn't.

(note: you've got a lot of extra ';' after your method implementations
that the compiler ignores.. but should probably be cleaned up)
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to