simple assignment not working for me: iphone sdk
Posted
by tak
on Stack Overflow
See other posts from Stack Overflow
or by tak
Published on 2010-05-05T21:07:27Z
Indexed on
2010/05/05
21:18 UTC
Read the original article
Hit count: 193
iphone
|iphone-sdk-3.0
Hi all. Can someone please explain to me why this simple assignment doesn't work.
Here is the code
loanDetails.currency = myCurrency;
NSLog(@" Value %@",myCurrency);
NSLog(@" Value %@",loanDetails.currency);
NSLog(@" Value %@",myCurrency);
the output is:-
2010-05-05 23:00:44.394 ExpenseTracker[3576:207] Value AFA
2010-05-05 23:00:44.750 ExpenseTracker[3576:207] Value (null)
2010-05-05 23:00:45.095 ExpenseTracker[3576:207] Value AFA
And the definition is as:
@property (nonatomic,retain) NSString *currency;
© Stack Overflow or respective owner