Re: Limiting a float
Re: Limiting a float
- Subject: Re: Limiting a float
- From: Michael Tsai <email@hidden>
- Date: Thu, 28 Aug 2003 10:22:05 -0400
On Thursday, August 28, 2003, at 09:30 AM, M. Uli Kusterer wrote:
Use [NSString stringWithFormat: @"%f.2", myFloat] and pass that to the
text field's setStringValue:. (The format string is from memory. Look
up printf-style format strings in your ANSI reference if it doesn't
work the way you want)
The format specifier needs to *end* with the f. One way to remember
this is to think about how you would detect the end of the special %
section if you were writing a format parser.
--Michael
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.