Different Dictionaries
Different Dictionaries
- Subject: Different Dictionaries
- From: Lorenzo <email@hidden>
- Date: Wed, 14 Jul 2004 18:27:54 +0200
Hi,
I have some problem with the method isEqualToDictionary. It returns that 2
dictionaries are different while indeed they should be equal.
I have one only dictionary called memDict.
[memDict writeToFile:path atomically:YES];
readDict = [NSDictionary dictionaryWithContentsOfFile:path];
if([memDict isEqualToDictionary:readDict]){
NSLog(@"Dictionaries are Equal");
}
else NSLog(@"Dictionaries are NOT Equal");
And I got always the log "Dictionaries are NOT Equal".
It seems that once saved to a file, the readDict dictionary written to the
disk becames different. No matter if I use NSDictionary or
NSMutableDictionary.
So, how can I compare if the saved readDict is Equal to the memDict I have
in memory? I need this in order to tell the user to save the changes.
Best Regards
--
Lorenzo
email: email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.