Can someone help me out on what steps i need to follow to make tominated browser have downloads. if possible, can you describe what all the code means/does?
Basically you probably need a queue type structure to handle multiple downloads and handle the call backs for each download as Robbie says. The main problem is that downloads are asynchronous so you can't just call method that says download this and get the file back as a return value. You say, start this download, you go off and do something else and the OS sends your code messages saying download failed, done this much, download finished etc.
This stuff isn't complicated to do but it is done almost entirely in code. I feel you may find it rather hard to do this at this stage given your current level of knowledge.
Only allowing one download at a time is obviously easier as you won't need the queue...but sucks as a design decision.
Basically you probably need a queue type structure to handle multiple downloads and handle the call backs for each download as Robbie says. The main problem is that downloads are asynchronous so you can't just call method that says download this and get the file back as a return value. You say, start this download, you go off and do something else and the OS sends your code messages saying download failed, done this much, download finished etc.
This stuff isn't complicated to do but it is done almost entirely in code. I feel you may find it rather hard to do this at this stage given your current level of knowledge.
Only allowing one download at a time is obviously easier as you won't need the queue...but sucks as a design decision.
hold your horses, i only just started with cocoa. all that was german to meYou don't need to maintain a very complicated queue. The messages the delegate receives are all setout here under the Class Description. All of them pass an NSURLDownload object that is unique per download. To begin with most of the delegate methods are probably not needed (or at least you can provide an implementation that does as close to nothing as will work). Most of the methods are there to let you control redirections and user authentication and to update progress bars etc. None of which are required to just get up and running.
Probably the only one you actually need to do much with to start with is - (void)downloadNSURLDownload *)download decideDestinationWithSuggestedFilenameNSString *)filename without which the file won't save anywhere!
My understanding is that the NSURLDownload objects handle the asynchronous background downloading for you, probably by doing something every time through the run loop.
If I'm bored tonight I might try and put together a simple demo project showing how to get the basics of downloads running...
hold your horses, i only just started with cocoa. all that was german to me
Can I have some of that motivation to tinker around with programming projects? I'm all void of programming motivation.If I'm bored tonight I might try and put together a simple demo project showing how to get the basics of downloads running...
Can I have some of that motivation to tinker around with programming projects? I'm all void of programming motivation.
I know the feeling. Good luck. What are the highlights of the new version?Demos are easy. I'm struggling to get the motivation up to finish off the next release of Poster Paint. It's like 90% done, the last 10% is the nasty bug fixing and tidying for release that I'm not too excited about!
I know the feeling. Good luck. What are the highlights of the new version?
do you mind if i borrow some of the code for the next beta of tominated?
As I put in the header of each file. Anyone who downloads it can do whatever they want with it. Consider it public domain.
As a side note, for the source code .zip download of your tominated browser download, try doing a "make clean" or whatever equivalent that your IDE uses, so that there aren't any temporary build files in there.
EDIT: whivh connection between the webview and the appcontroller is needed for just donloading. i have already got a different method for that fetch thing and i don't know which files to copy over...
...or...
...if you have the time, can you put the downloading stuff in the source of tominated? i don't mean to be annoying, it's just, i wanna get this to version 1 as fast as possible. you can get the source from the tominated software link in my signiture
So when does Duncanated v1.0 come out?