discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSNumberFormatter working?


From: Andreas Hoeschler
Subject: NSNumberFormatter working?
Date: Mon, 27 Jan 2003 22:46:13 +0100

Hi all,

is NSNumberFormatter working or is this still something to be implemented?

   NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init];
   [_textField release];
   _textField = [[NSTextField alloc] init];
   [numberFormatter setFormat:format]; // format = @"0.000"
   [[_textField cell] setFormatter:numberFormatter];
   [numberFormatter release];

   [_textField setObjectValue:objectValue];
   return [_textField stringValue];

This code returns "100" for objectValue = [NSNumber numberWithDouble:100.0]. Am I missing anything or is this a bug?

Regards,

   Andreas





reply via email to

[Prev in Thread] Current Thread [Next in Thread]