Women in Technology

Hear us Roar



Article:
  BYOB: Build Your Own Browser, Part 3
Subject:   Lost...
Date:   2004-08-04 09:28:02
From:   Zarac

I've enjoyed this series tremendously, but am frustrated I can't implement the last piece. I was doing okay until I tried to compile this:


- (void)webView:(WebView *)sender decidePolicyForNavigationAction:
(NSDictionary *)actionInformation request:(NSURLRequest *)request frame:
(WebFrame *)frame decisionListener:(id<WebPolicyDecisionListener>)listener
{
NSString* urlKey = [[actionInformation objectForKey:WebActionOriginalURLKey] host];


The compiler balks at <WebPolicyDecisionListener> and WebActionOriginalURLKey and I haven't found any other references to these values.


Coming from Java, I don't get the id<WebPolicyDecisionListener> syntax.

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • Lost...
    2004-08-05 05:55:19  Andrew Anderson | [View]

    WebActionOriginalURLKey is a constant defined in WebPolicyDelegate.h. Make sure you are importing the file, if not include:
    #import <WebKit/WebPolicyDelegate.h>

    in either your MyDocument.m or MyDocument.h file.

    Andrew