Hi,
I am trying to get NSStrings from a NSMutableArray, but my app is crashing...
Here is my Code - the app is crashing on "branch = [....]; but the NSMutableArray is filled with (see test below)...
Code:
showData = [[NSMutableArray alloc]init];
branch =[showData objectAtIndex:0];
company = [showData objectAtIndex:1];
name = [showData objectAtIndex:2];
phone = [showData objectAtIndex:3];
email = [showData objectAtIndex:4];
price = [showData objectAtIndex:5];
notes = [showData objectAtIndex:6];
NSLog(@"The Branch: %@", company);
My NSMutable Array:
New Array: 12, 13, 14, 15, 16, 19, 18
Test: INSERT OR REPLACE INTO PARTNER (branche, company, name, phone, email, price, notes ) VALUES ('12', '13', '14', '15', '16', '19', '18');
Crashlog: New Array: 12, 13, 14, 15, 16, 19, 18
2010-02-07 21:28:00.956 WPlite[9034:207] *** -[NSCFString objectAtIndex:]: unrecognized selector sent to instance 0x3b77970
2010-02-07 21:28:00.957 WPlite[9034:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFString objectAtIndex:]: unrecognized selector sent to instance 0x3b77970'
May you please can point me to the right direction...
Thanks for any advice,
Stefan