Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Rappa819

macrumors newbie
Original poster
Feb 28, 2008
29
0
So I have my .h and .m files, respectively:

Code:
#import <Foundation/Foundation.h>


@interface ThisController : UIViewController {

	IBOutlet UIWebView *ThisWebView;
}

@property (nonatomic, retain) UIWebView *ThisWebView;

@end

Code:
#import "ThisController.h"


@implementation ThisController
@synthesize ThisWebView;

- (void)viewDidLoad {
	[super viewDidLoad];
	
	NSString *urlAddress = @"http://www.google.com";
	
	//Create a URL object.
	NSURL *url = [NSURL URLWithString:urlAddress];
	
	//URL Requst Object
	NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
	
	//Load the request in the UIWebView.
	[ThisWebView loadRequest:requestObj];
}

- (void)dealloc {
	[ThisWebView release];
    [super dealloc];
}

@end

I also have the nib file, views are connected, and the UIWebView controller is connected to ThisWebView.

When I run the app, I tap on the row of the table that this is associated with and it freezes. I get TERMINATION DUE TO UNCAUGHT EXCEPTION on thread 1. and semaphore wait signal trap on thread 2.

Does anyone know what this means or knows how to fix it?
 
nothing seems wrong with the webview code you have posted.
The error seems to be in your table view.Look into your didSelectRowAtIndexPath delegate defined in your table view controller. Try to put a breakpoint inside this delegate or use NSLog after each statement to see where you are going wrong.
 
Is there something special I need to do with the table view to load a UIWebView, Again its a table populated with a list of arrays, and each member of the array points to the specific section and row to load a nib file for that item when its selected by the user. It works with any other object (text view, labels, boxes) except when i drop a web view onto the nib, connect everything, and run it, when I click that table item it crashes. I cant figure out whats wrong.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.