simple assignment not working for me: iphone sdk
- by tak
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;