I have a program with two classes: THSite and THController. The program is eventually supposed to search a web site and gather all internal and external links. This will be done recursively through the method "searchNode:" in THSite. However, I am not having success making a load request from within this method, which is called from THController. I have no problem making a load request from within awakeFromNib. This is weird, as the actual load request is the same in each case. "webView" is the outlet to the instance of WebView created in IB. Here is some code:
I tried each separately, of course. Any idea of what might be wrong?
Also, do you know of a way with Cocoa to access web data without loading it into a view?
Code:
-(void)searchNode:(NSString*)url{
[[webView mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://name.com/"]]];
NSLog(@"hey"); //this is to check that the method was called
// unrelated code commented out during trouble-shooting
}
-(void)awakeFromNib{
[[webView mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://name.com/"]]];
}
I tried each separately, of course. Any idea of what might be wrong?
Also, do you know of a way with Cocoa to access web data without loading it into a view?