Re: NSCell's floatValue
Re: NSCell's floatValue
- Subject: Re: NSCell's floatValue
- From: Matthias Winkelmann <email@hidden>
- Date: Sat, 20 May 2006 15:24:58 +0200
Okay, I guess I solved this problem by myself:
The NSCell always saves it's value as an NSString. [cell floatValue]
just returns [string floatValue]. Due to localization, the string was
formatted with a comma ("0,4545") which the scanner didn't recognize.
Might actually be a bug.
Quck fix: manually replace the comma with a point.
Am 20.05.2006 um 13:57 schrieb Matthias Winkelmann:
Hi,
I'm having a bit of trouble subclassing NSCell, more specifically
getting a float value from a cell. stringValue returns a correct
string representation of the float, but floatValue just returns
null. I want to use the float value to draw an image, much like
NSLevelIndicatorCell, so the stringValue doesn't really help me
(yes, I could convert it, but that doesn't seem very elegant.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden