Re: NSString stringWithFormat woes

2008-04-08 Thread Hamish Allan
On Tue, Apr 8, 2008 at 8:33 PM, Stuart Green <[EMAIL PROTECTED]> wrote: > returnString = [NSString stringWithFormat:@"%c-%i-%i-%f", > asciiString, firstDouble, secondDouble, thirdDouble]; You have a format string for character-integer-integer-float/double, not string, double, double, doub

Re: NSString stringWithFormat woes

2008-04-08 Thread Jack Repenning
On Apr 8, 2008, at 12:33 PM, Stuart Green wrote: returnString = [NSString stringWithFormat:@"%c-%i-%i-%f", asciiString, firstDouble, secondDouble, thirdDouble]; Which is producing a weird output when used outside of an NSLog. Examining each parameter in the debugger shows exactly what I wan

Re: NSString stringWithFormat woes

2008-04-08 Thread Michael Vannorsdel
Try casting them to ints before formatting: returnString = [NSString stringWithFormat:@"%c-%i-%i-%f", asciiString, (int)firstDouble, (int)secondDouble, thirdDouble]; On Apr 8, 2008, at 1:33 PM, Stuart Green wrote: Hi, I have a string declaration of: returnString = [NSString stringWithFo

Re: NSString stringWithFormat woes

2008-04-08 Thread Randall Meadows
On Apr 8, 2008, at 1:33 PM, Stuart Green wrote: Hi, I have a string declaration of: returnString = [NSString stringWithFormat:@"%c-%i-%i-%f", asciiString, firstDouble, secondDouble, thirdDouble]; If asciiString really is an ASCII (null-terminated) string, then you need to use %s, not %c.

NSString stringWithFormat woes

2008-04-08 Thread Stuart Green
Hi, I have a string declaration of: returnString = [NSString stringWithFormat:@"%c-%i-%i-%f", asciiString, firstDouble, secondDouble, thirdDouble]; Which is producing a weird output when used outside of an NSLog. Examining each parameter in the debugger shows exactly what I want, i.e. an