Problem with fetching dictionary objects in array from plist iphone sdk

Posted by neha on Stack Overflow See other posts from Stack Overflow or by neha
Published on 2010-05-12T07:40:58Z Indexed on 2010/05/12 7:44 UTC
Read the original article Hit count: 688

Filed under:
|
|

Hi all, What is the datatype you use to fetch items whose type is dictionary in plist i.e. nsmutabledictionary or nsdictionary? Because I'm using following code to retrieve dictionary objects from an array of dictionaries in plist.

NSMutableDictionary *_myDict = [contentArray objectAtIndex:0]; 

NSLog(@"MYDICT : %@",_myDict);
NSString *myKey = (NSString *)[_myDict valueForKey:@"Contents"] ; 

[[cell lblFeed] setText:[NSString stringWithFormat:@"%@",myKey]];

Here, on first line it's showing me objc_msgsend. ContentArray is an nsarray and it's contents are showing 2 objects that are there in plist. In plist they are dictionary objects. Then why this error?

Can anybody please help?

Thanx in advance.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about iphone-sdk