I am having trouble determining if two dictionaries from two different objects contain the same information. Here is the method:
-(void)checkForNewRefs

query *)queryToCheck {
query *newQueryResults;
newQueryResults=[self generateQuery:[queryToCheck valueForKey:@"queryTitle"]];
if ([[newQueryResults valueForKey:@"referenceDictionary"] allKeys]==[[queryToCheck valueForKey:@"referenceDictionary"] allKeys]) {
NSLog(@"No new refs");
}
else {
NSLog(@"New refs");
NSLog([newQueryResults valueForKey:@"referenceDictionary"]);
}
}
This is the NSLog output:
2002-03-29 10:08:17.308 CocoaMed[383] New refs
2002-03-29 10:08:17.309 CocoaMed[383] *** -[NSCFDictionary length]: selector not recognized
2002-03-29 10:08:17.322 CocoaMed[383] *** -[NSCFDictionary length]: selector not recognized
I have used the valueForKey calls to retrieve the dictionaries in other methods and they work fine so I don't think that is the problem, but the '[NSCFDictionary length]: selector not recognized' output makes me think otherwise. Any ideas? Am I going about this the wrong way? The dictionaries contain the same keys but the objects are pointers to different objects (but the same info). The method is designed to repeat a search on the internet and then determine if anything has changed (i.e. if newQueryResults has updated compared to queryToCheck).
thanks,
kman