Hey there, my app has a search bar that searches a plist file. I've created the plist file but I keep getting this error:
[Session started at 2010-07-27 19:11:07 +0530.]
2010-07-27 19:11:12.550 InfoCarApp[2062:20b] *** -[NSCFDictionary allkeys]: unrecognized selector sent to instance 0x3d51440
2010-07-27 19:11:12.552 InfoCarApp[2062:20b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFDictionary allkeys]: unrecognized selector sent to instance 0x3d51440'
My app basically searches through the plist and it has to display the data in an tableView. Here's the code how I have declared the plist:
- (void)viewDidLoad {
[super viewDidLoad];
NSString *path = [[NSBundle mainBundle] pathForResource:@"sortednames" ofType:@"plist"];
NSDictionary *dict = [[NSDictionary alloc] initWithContentsOfFile:path];
//self.names = dict;
self.allNames = dict;
[dict release];
//NSArray *array = [[names allKeys] sortedArrayUsingSelector:@selector(compare:)];
//self.keys = array;
[self resetSearch];
search.autocapitalizationType = UITextAutocapitalizationTypeNone;
search.autocorrectionType = UITextAutocorrectionTypeNo;
}
Please help. Thanks in advance.