#import "SimpleBrowserController.h"

@implementation SimpleBrowserController
//START:code.delegates.resetbutton
- (void) resetButtons {	
	[backButton setEnabled:[myWebView canGoBack]];
	[forwardButton setEnabled:[myWebView canGoForward]];
}
//END:code.delegates.resetbutton

- (void)webView:(WebView *)sender didReceiveTitle:(NSString *)title 
	                                     forFrame:(WebFrame *)frame {
	[applicationWindow setTitle:title];
}

- (void)webView:(WebView *)sender 
                           didFinishLoadForFrame:(WebFrame *)frame {
	[inputField setStringValue:[myWebView mainFrameURL]];
	[self resetButtons];
}

@end
