NSURL question
NSURL question
- Subject: NSURL question
- From: Yuhui <email@hidden>
- Date: Wed, 22 Aug 2001 23:08:20 -0500
Hi
I've had some success with my first Cocoa program, but I need help with
NSURL. Basically, my code gets a URL string (with http:// and
everything), then retrieves the resource into a string. Here's my code:
data = [NSMutableString
stringWithContentsOfURL:@"
http://www.apple.com/"];
where 'data' is the string to contain the contents of the URL, using
www.apple.com as an example.
After this line of code, I do some manipulation on data. Problem is, my
app starts this manipulation before all of the URL contents have fully
loaded, i.e. data contains only part of the contents. After reading the
NSURL document, I realize that I need to somehow implement NSURLHandle
to check whether all of the contents have been loaded, but I'm unsure
about how to go about doing this.
Can anyone help please? I'd appreciate it a lot.
Thanks
Yuhui