Quote:
Originally Posted by seb_bue
Where do you fill the Array with data?
showData = [[NSMutableArray alloc] init] creates a new and empty array.
The code seems to be right for me, if you fill the array between the first and second line.
The error says, that you try to call the method objectAtIndex from a String: [NSCFString objectAtIndex:]
If you copy the whole code, we can have a look at it.
|
Hi Seb,
thanks for your reply:
Code:
-(void)viewDidLoad {
NSLog(@"New Array: %@", showData);
NSString *branch =[showData objectAtIndex:0];
NSLog(@"Die Firma: %@", branch);
NSString *company = [showData objectAtIndex:1];
NSString *name = [showData objectAtIndex:2];
NSString *phone = [showData objectAtIndex:3];
NSString *email = [showData objectAtIndex:4];
NSString *price = [showData objectAtIndex:5];
NSString *notes = [showData objectAtIndex:6];
NSLog(@"The Branch: %@", branch);
}
- (IBAction) changeProductText:(NSMutableArray *) arryData{
NSLog(@"array: %@", arryData);
showData = [[NSMutableArray alloc]init];
showData = arryData;
}
Thanks for your help! BR,
Stefan