Hi foks

Hopefully the right place to ask this question.

In the project I'm working on, I have a webview that's going to a
specific site. When the user downloads files from that site, I want to
intercept them (basically grab the URL, get the file and parse the
contents).

So in my controller class I have

IBOutlet WebView *webview; //in controller.h
//and
[webview setDownloadDelegate:self]; //in the controller awakeFromNib

//I also took this from Hillegass' book to get a feel for how
downloads work (what delegate methods are called and when):
- (BOOL)respondsToSelector:(SEL)aSelector
{
       NSString *methodName = NSStringFromSelector(aSelector);
       NSLog(@"respondsToSelector: %@", methodName);
       return [super respondsToSelector:aSelector];
}

Now that works with a sampling of random sites I went to:

2009-04-23 22:01:41.122 AO[42395:10b] respondsToSelector: downloadDidBegin:
2009-04-23 22:01:41.124 AO[42395:10b] respondsToSelector:
download:willSendRequest:redirectResponse:
2009-04-23 22:01:41.458 AO[42395:10b] respondsToSelector:
download:didReceiveResponse:
2009-04-23 22:01:41.460 AO[42395:10b] respondsToSelector:
download:didReceiveDataOfLength:
2009-04-23 22:01:41.569 AO[42395:10b] respondsToSelector:
download:didReceiveDataOfLength:
2009-04-23 22:01:41.983 AO[42395:10b] respondsToSelector:
download:decideDestinationWithSuggestedFilename:
2009-04-23 22:01:41.985 AO[42395:10b] respondsToSelector:
download:didCreateDestination:
etc


But with the specific links on that site, it did not work. No delegate
methods were called.

The problem as far as I can guess is that the links are actually
javascripts that fill out values in a form and submits it to the
server, which then spits out the file. Is there a clean way to
intercept these files?

Regards,
Mikkel
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to