• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSCell's floatValue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSCell's floatValue (From: Matthias Winkelmann <email@hidden>)

  • Prev by Date: Re: Problems during file writing or During Type Casting ?
  • Next by Date: Re: Trouble using ANY operator in an NSArrayController search predicate
  • Previous by thread: NSCell's floatValue
  • Next by thread: WebView/DOM tree link?
  • Index(es):
    • Date
    • Thread