NSURL Out of Scope

Posted by ct2k7 on Stack Overflow See other posts from Stack Overflow or by ct2k7
Published on 2010-04-07T23:35:14Z Indexed on 2010/04/07 23:53 UTC
Read the original article Hit count: 543

Filed under:
|
|

Hi, I've an issue with this piece of code:

NSURL *url = [[NSURL alloc] initWithString:@"http://authenticate.radonsystems.net/products.xml"];
NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithContentsOfURL:url];

//Initialize the delegate.
XMLParser *parser = [[XMLParser alloc] initXMLParser];

//Set delegate
[xmlParser setDelegate:parser];

//Start parsing the XML file.
BOOL success = [xmlParser parse];

if(success)
    NSLog(@"No Errors");
else
    NSLog(@"Error Error Error!!!");
} // this is the breakpoint!

I've listed where the breakpoint is - (I've placed one on every line of code in the area)

Now at this point, success = NO, and looking back through the code, I reach the first line. XCode tells me that the url variable is out of scope with code 0x15db010.

What does this mean?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c