Hi there, i have this code
Code:
NSMutableDictionary *dict = [[NSMutableDictionary alloc] initWithContentsOfFile:pListFilePath];
NSMutableDictionary *capabilities;
capabilities = [dict valueForKey:@"capabilities"];
NSString *value = [capabilities valueForKey:@"MyValue"];
NSLog(@"%@",value);
if ([value compare: @"1"] == NSOrderSame)
{
NSLog(@"Equal");
}
else
{
NSLog(@"Not Equal");
}
Now the problem is that the String "value" gets "1" from [capabilities valueForKey:@"MyValue"] and when i NSLog it, it displays "1" but it gives me an exception
Quote:
[NSCFString objCType]: unrecognized selector sent to instance 0x5158
2010-07-07 22:38:56.807 zToggle[2153:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFString objCType]: unrecognized selector sent to instance 0x5158'
|
means its giving me exception on
if ([value compare: @"1"] == NSOrderSame)
Any suggestions??