0

我使用了这段代码:

- (void)webView:(WebView *)sender didStartProvisionalLoadForFrame:(WebFrame *)frame //2 errors on this line stating: expected ")" before "WebView" and expected ")" before "WebFrame"
{
    //Only report feedback from main frame.
    if (frame == [sender mainFrame]) {
        NSString *url = [[[[frame dataSource] request] URL] absoluteString];
        [adressBar setStringValue:url];
    }
}

- (void)webView:(WebView *)sender didRecieveTitle:(NSString *)title forFrame:(WebFrame *)frame // Same 2 errors as the first line of code
{
    if (frame == [sender mainFrame]){
        [[sender window] setTitle:title];
    }
}

但它没有在文本字段中设置窗口的标题或完整的 url……我错过了什么吗?编辑:我已经连接了一切。

4

0 回答 0