Re: problem with floats/floatForKey
Re: problem with floats/floatForKey
- Subject: Re: problem with floats/floatForKey
- From: Magnus Strand <email@hidden>
- Date: Thu, 21 Apr 2005 08:40:12 +0200
Hi Duncan,
I can't see any error in your code,
Have you checked myVar:s value before and after assignment with the
debugger?
Magnus Strand
Duncan Campbell wrote:
Hey folks.
If i do the following:
NSLog(@"direct from Defaults: %f",[defaults floatForKey:@"myFloatKey"]);
I get the value I want.
However, if I do this:
float myVar = [defaults floatForKey:@"myFloatKey"];
NSLog(@"after assignment: %f",myVar);
I get a very funky value for "myVar".
What am I doing wrong here?
Cheers.
---------------------------------------------------------------
Duncan Campbell
http://www.duncanandsarah.com/duncan
---------------------------------------------------------------
------------------------------------------------------------------------
_______________________________________________
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
--
*Magnus Strand *
Systemutvecklare | System Developer, MSc
*Teknik i Media* | Södra Förstadsgatan 2 | 211 43 Malmö | Tel +46 40 601
57 00 | Fax +46 40 601 57 99
Direkt +46 40 601 57 16 | Mobil +46 704 20 57 16 | email@hidden
| www.tim.se
/This message contains information that may be privileged or
confidential and is the property of Teknik i Media. / /It is intended
only for the person to whom it is addressed. If you receive this message
in error, please notify the sender immediately and delete all copies of
this message. /
_______________________________________________
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