Re: Problem with WebKit Download Delegate
site_archiver@lists.apple.com Delivered-To: cocoa-dev@lists.apple.com Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=r69tJkv3jDzeIszXH86tSOx0b+h0ccCqOlQJ/vpECLmFyEhuO04xtDKvCdcR8+IoiCIhPJNZdULbOtrm5uNnF5ZCHR34H5pySD9YyJJKK7eA0D6AKtBvCmyzXS0LxTJGGJLQtMvXxZC+vSTI6LuggJFGNpZDts9iyUouUBf0tZs= Unfortunately I'm way over my head, and could really use some sample code that shows me how to turn a click on a .zip file URL on a web page displayed by WebKit into a local disk file. But none of the sample code that I've found, including Apple's MiniBrowser, shows me how to do this. I've been unsuccessful trying to find it with Google or on any of the other usual sources. Hi Dave, What needs to be done now is to implement a startLoading: method in your NSURLProtocol subclass. You can find how to do this inside the PictureBrowser example. This provides the actual data that will be used to save the file. In addition, you need to override - (void)download:(NSURLDownload *)download decideDestinationWithSuggestedFilename:(NSString *)filename inside your subclass of WebDownload. This is where you'll place your "Save As..." panel. I was actually stuck with this exact same problem about a month back actually, and the docs did help quite abit. Unfortunately, I can't provide any of my code to you as my backend uses CoreData and is quite different from what you need to do. :-( Hope this helps! Cheers, Joe FunkeeMonk Technology - http://www.funkeemonk.com/ _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/site_archiver%40lists.apple... On 1/2/07, Dave Batton <Dave@mere-mortal-software.com> wrote: This email sent to site_archiver@lists.apple.com
participants (1)
-
Joe Goh