I have an array inside an (mutable) array. I am trying to replace certain objects with "replaceObjectAtIndex."
I 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 information [5145: 207] * Application terminated due to an uncaught exception "NSInvalidArgumentException", reason: '- [__ NSArrayI replaceObjectAtIndex: withObject:]: unrecognized selector sent to instance 0x4e24d70 '
I tried this too:
[mutableArrayName replaceObjectAtIndex:[[mutableArrayName objectAtIndex:0]objectAtIndex:0] withObject:@"TEST"];
but I get the following error:
* Application termination due to an uncaught exception "NSRangeException", reason: "* - [NSMutableArray replaceObjectAtIndex: withObject:]: index 16660 is out of bounds [0 .. 0] '
source share