when i run it in the simulator i always get terminating_due_to uncaught_exception, this block of code seems to be the problem.
qInput and aInput are UITextViews
and q and a are mutable arrays
Code:
- (IBAction)inputPressed:(id)sender
{
int i = 1;
q = [[NSMutableArray alloc]initWithCapacity:20];
a = [[NSMutableArray alloc]initWithCapacity:20];
[[q objectAtIndex:i]setText:qInput.text];
[[a objectAtIndex:i]setText:aInput.text];
i++;
}
whats wrong?
canzhi