From 6d3f21336846d7745e795202c99390832c4220c8 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Sat, 19 Mar 2011 15:05:23 +0000 Subject: Bring outline view branch up to date with trunk (r3235:r3245), which should resolve all warnings. --- Source/SPBundleHTMLOutputController.m | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) (limited to 'Source/SPBundleHTMLOutputController.m') diff --git a/Source/SPBundleHTMLOutputController.m b/Source/SPBundleHTMLOutputController.m index 6e5ffedd..1995cfcb 100644 --- a/Source/SPBundleHTMLOutputController.m +++ b/Source/SPBundleHTMLOutputController.m @@ -29,13 +29,28 @@ @class WebScriptCallFrame; +#pragma mark - + +@interface WebView (WebViewPrivate) +- (void) setScriptDebugDelegate:(id) delegate; +@end + +@interface WebScriptCallFrame : NSObject +- (id)userInfo; +- (WebScriptCallFrame *)caller; +- (NSString *)functionName; +- (id)exception; +@end + +#pragma mark - + @implementation SPBundleHTMLOutputController @synthesize docTitle; @synthesize initHTMLSourceString; @synthesize windowUUID; @synthesize docUUID; -@synthesize suppressExceptionAlert; +@synthesize suppressExceptionAlerting; /** * Initialisation @@ -52,8 +67,10 @@ [webView setDrawsBackground:YES]; [webView setEditable:NO]; [webView setShouldCloseWithWindow:YES]; +#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 [webView setShouldUpdateWhileOffscreen:NO]; - suppressExceptionAlert = NO; +#endif + suppressExceptionAlerting = NO; } @@ -311,7 +328,7 @@ [newWebView showWindows]; } -- (void)webView:(WebView *)webView decidePolicyForNavigationAction:(NSDictionary *)actionInformation request:(NSURLRequest *)request frame:(WebFrame *)frame decisionListener:(id)listener +- (void)webView:(WebView *)aWebView decidePolicyForNavigationAction:(NSDictionary *)actionInformation request:(NSURLRequest *)request frame:(WebFrame *)frame decisionListener:(id)listener { NSInteger navigationType = [[actionInformation objectForKey:WebActionNavigationTypeKey] integerValue]; @@ -335,11 +352,11 @@ switch(navigationType) { case WebNavigationTypeLinkClicked: - [[webView mainFrame] loadRequest:request]; + [[aWebView mainFrame] loadRequest:request]; [listener use]; break; case WebNavigationTypeReload: - [[webView mainFrame] loadHTMLString:[self initHTMLSourceString] baseURL:nil]; + [[aWebView mainFrame] loadHTMLString:[self initHTMLSourceString] baseURL:nil]; break; default: [listener use]; @@ -506,7 +523,7 @@ NSString *mes = [NSString stringWithFormat:@"Exception:\nline = %ld\nfunction = %@\ncaller = %@\nexception = %@", lineno, [frame functionName], [frame caller], [frame userInfo], [frame exception]]; - if([self suppressExceptionAlert]) { + if([self suppressExceptionAlerting]) { NSLog(@"%@", mes); return; } @@ -599,7 +616,7 @@ */ - (void)suppressExceptionAlert { - [self setSuppressExceptionAlert:YES]; + [self setSuppressExceptionAlerting:YES]; } /** -- cgit v1.2.3