I am writing an iOS application, which required me to use some NSMutableArray's. Before, I was using NSMutableDictionary (under the same variable name), but I commented out code that has to do with the dictionary. Now, when using NSMutableArray, I am calling the method -addObject:. However, Xcode keeps giving me a warning saying that "NSMutableDictionary may not respond to -addObject:". However, I have checked, and checked again, and again, that the definition and allocation both say NSMutableArray not NSMutableDictionary. I even tried commenting out NSMutableDictionary code in my class, however the warning persists. The application runs fine and can execute the methods successfully, however the warnings are annoying. I am using Snow Leopard 10.6.8, Xcode 4.0.2. I tried restarting Xcode, but it didn't help. Any suggestions?
.h:
NSArray *array;
NSMutableArray *mutableArray;
.m
//allocation
mutableArray = [[NSMutableArray alloc] init];
//line where I get warning
[mutableArray addObject:someObj];
This happens with every array I tested with.