iphone - test NSDictionary valueForKey using ISEqualToString -


i using if statement see if valueforkey @"t" in nsdictionary, don't think accessing nsdictionary correctly because when know valueforkey t never enters if statement.

this code looks like:

if ([[getobj valueforkey:@"hassetid"] isequaltostring:@"t"]) {         [arrayofbuttonimages addobject:firstbuttonimage];     } 

so if statment never entered if t.

if 1 knows how test valueforkey of nsdictionary appreciated if me insight.

this supposed work, , it indeed. error somewhere else. try logging contents of dictionary:

nslog(@"%@", dict); 

to see if key @"hassetid", , value indeed @"t". don't have whitespace character in 1 of them? etc.


Comments

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -