I have an array within an (mutable) array. I am trying to replace certain objects with "replaceObjectAtIndex."
I have tried:
[[mutableArrayName objectAtIndex:0]replaceObjectAtIndex:0 withObject:@"TEST"];
but I get the following error:
-[__NSArrayI replaceObjectAtIndex:withObject:]: unrecognized selector sent to instance 0x4e24d70 2011-03-17 17:02:07.008 Contact details[5145:207] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayI replaceObjectAtIndex:withObject:]: unrecognized selector sent to instance 0x4e24d70'
I tried this as well:
[mutableArrayName replaceObjectAtIndex:[[mutableArrayName objectAtIndex:0]objectAtIndex:0] withObject:@"TEST"];
but I get the following error:
* Terminating app due to uncaught exception 'NSRangeException', reason: '* -[NSMutableArray replaceObjectAtIndex:withObject:]: index 16660 beyond bounds [0 .. 0]'