• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Click on a URL in WebKit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Click on a URL in WebKit


  • Subject: Click on a URL in WebKit
  • From: malcom <email@hidden>
  • Date: Wed, 31 May 2006 11:15:18 +0200

Hi list,
I've created using XSL+CSS+HTML a web page. You can see it here:

http://www.malcom-mac.com/files/webkit_test/prova.html

There are two nodes. If you click on each node a javascript try to
loading an http:// address. However it's not a normal web site. I need
to intercept it to load a particular file on the disk with the given
code (url path is the unique code).
I've tried with this into the target WebKit delegate class.

- (void)webView:(WebView *)sender
decidePolicyForNavigationAction:(NSDictionary *)actionInformation
request:(NSURLRequest *)request frame:(WebFrame *)frame
decisionListener:(id<WebPolicyDecisionListener>)listener; {
	NSLog(@"POLICY: .%@. %@",[[request URL] scheme],[[request URL] path]);
	if (![[[request URL] scheme] isEqualToString:@"http"])
		[listener use];
	else {
		[listener ignore];
		NSLog(@"[%@]",[[request URL] path]);
		ANTArtNode *art = [_sGroup getArticleNodeForID: [[request URL] path]];
		[self loadArticle: art forGroup: _sGroup];

	}
}

However it does not work and nothing will be launched.
Policy nslog returns:

POLICY: .about. (null)
POLICY: .applewebdata.

Why?
Thanks.
malcom
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Click on a URL in WebKit
      • From: Rush Manbert <email@hidden>
  • Prev by Date: Re: NSTableView selection (partial solution)
  • Next by Date: Re: NSAttributedString drawing and NSText drawing
  • Previous by thread: Re: NSTableView selection (partial solution)
  • Next by thread: Re: Click on a URL in WebKit
  • Index(es):
    • Date
    • Thread