iphone - NSURL Exceptions -


i trying grab path value array nsurl set icon in app. an

nsinvalidargumentexception', reason: '-[__nsarrayi length]: unrecognized selector sent instance 0x5622590.

if use nslog expected output:

nslog(@"%@",[[wforecast.wicons objectatindex:0]valueforkey:@"nodecontent"]); 

which gives me:

enter image description here

im setting value follows

nsurl *urlpath;  nsstring *urls = [[wforecast.wicons objectatindex:0] valueforkey:@"nodecontent"];  urlpath = [nsurl urlwithstring:(nsstring *)urls]; 

i appreciate longwinded way of doing things trying break individual components find out going wrong @ loss!

you have same problem this other questioner had. passed object not nsstring needed pass nsstring.

use debugger determine exception occurred. if haven't done this, wouldn't sure code showed caused it; debugger tell exception occurred no room doubt.

once you've found exception occurred, can examine object passed, , @ got from. need fix either how retrieve string or how stored in place you're getting from.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -