 |
 |
Downloading Files In Cocoa: Part 2
|
 |
|
 |
|
Posting Junkie
Join Date: May 2001
Location: Portland, OR
Status:
Offline
|
|
OK, earlier I posted on downloading files in Cocoa. I got that working (putting NSUrl into a NSData and saving it), but I ran into a problem. For technical reasons the download needs to be streaming, meaning the file is written as data is recieved. My current setup does not do this.
Any pointers or ideas on how to accomplish this?
|
|
8 Core 2.8 ghz Mac Pro/GF8800/2 23" Cinema Displays, 3.06 ghz Macbook Pro
Once you wanted revolution, now you're the institution, how's it feel to be the man?
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status:
Offline
|
|
I think NSURLHandle is what you want.
|
|
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: May 2001
Location: Portland, OR
Status:
Offline
|
|
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">Originally posted by Angus_D:
<strong>I think NSURLHandle is what you want.</strong></font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">If I'm radint the documentation correctly, it doesn't provide me any advantages over the NSData method. I want to writ ethe data as its being recieved. It still looks like, with NSURLhandle, that I most load the data into the NSURLHandle all at once then write it.
Is this correct?
|
|
8 Core 2.8 ghz Mac Pro/GF8800/2 23" Cinema Displays, 3.06 ghz Macbook Pro
Once you wanted revolution, now you're the institution, how's it feel to be the man?
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status:
Offline
|
|
You can set up a delegate type thing and tell the handle to -loadInBackground, or similar. Then you can use the partial data notification. I'm working from memory here, but I did something similar to fill a progressbar as a file downloaded.
|
|
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: May 2001
Location: Portland, OR
Status:
Offline
|
|
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">Originally posted by Angus_D:
<strong>You can set up a delegate type thing and tell the handle to -loadInBackground, or similar. Then you can use the partial data notification. I'm working from memory here, but I did something similar to fill a progressbar as a file downloaded.</strong></font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">I don't suppose you could get me the code you used?
Reason I'm asking is because delegation is something I've NEVER done before. 
|
|
8 Core 2.8 ghz Mac Pro/GF8800/2 23" Cinema Displays, 3.06 ghz Macbook Pro
Once you wanted revolution, now you're the institution, how's it feel to be the man?
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|