Hello to all. And first of all Happy Holidays to all. I am having problems with my app crashing. I got the UIPicker working and I am able to use the selected data in my app. See my thread UIPicker help for further details on that. But now when I click the button my app crashes with this error in the console.
2009-12-24 23:17:43.609 ICookie[10353:207] *** -[UITextField setValue:]: unrecognized selector sent to instance 0x3b0cee0
2009-12-24 23:17:43.610 ICookie[10353:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[UITextField setValue:]: unrecognized selector sent to instance 0x3b0cee0'
I did not include the stack. If that would help diagnose this I can include it. Here is the method that is connected to the button. When I comment all lines except the NSLog command it runs fine. I do not see where in this the problem lies.
2009-12-24 23:17:43.609 ICookie[10353:207] *** -[UITextField setValue:]: unrecognized selector sent to instance 0x3b0cee0
2009-12-24 23:17:43.610 ICookie[10353:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[UITextField setValue:]: unrecognized selector sent to instance 0x3b0cee0'
I did not include the stack. If that would help diagnose this I can include it. Here is the method that is connected to the button. When I comment all lines except the NSLog command it runs fine. I do not see where in this the problem lies.
Code:
-(IBAction) calc:(id)sender
{
float converttemp = [firsttextbox floatValue];
if ([from objectAtIndex:[calcPicker selectedRowInComponent:0]] == @"Teaspoon" && [to objectAtIndex:[calcPicker selectedRowInComponent:1]] == @"Tablespoon") {
float tsp_tbsresult;
tsp_tbsresult = converttemp / 3;
outputtxt = tsp_tbsresult;
[secondtextbox setValue:(float) outputtxt];
NSLog(@"Teaspoon and tablespoon have been selected");
}
}