Do you know of any tutorial on how to set up a webview in a mac os x - app? Or any code-samples, perhaps?
Anything to get me from getting the damned "SIGABRT"-error I get all the time I try setting a webview-project up as described below:
myAppDelegate.h
myAppDelegate.m
MainMenu.xib
- A webview is added to the window.
- The webview is then linked in the "Referencing Outlets" to the "my App Delegate" > "webView" that was declared in the h-file above.
Still I keep getting a "SIGABRT"-error (with no other info), so I guess Im doing something wrong...
Anything to get me from getting the damned "SIGABRT"-error I get all the time I try setting a webview-project up as described below:
myAppDelegate.h
Code:
#import <Cocoa/Cocoa.h>
#import <WebKit/WebKit.h>
@interface myAppDelegate : NSObject <NSApplicationDelegate> {
// Declare: WebView
IBOutlet WebView *webView;
}
@property (assign) IBOutlet NSWindow *window;
// Set property: WebView
@property (nonatomic, retain) IBOutlet WebView *webView;
@end
myAppDelegate.m
Code:
#import "myAppDelegate.h"
@implementation myAppDelegate
@synthesize window;
// Synt: WebView
@synthesize webView;
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
// LOAD WEBSITE
NSString *urlAddress = @"http://www.iphonedevsdk.com";
NSURL *url = [NSURL URLWithString:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[webView loadRequest:requestObj];
}
@end
MainMenu.xib
- A webview is added to the window.
- The webview is then linked in the "Referencing Outlets" to the "my App Delegate" > "webView" that was declared in the h-file above.
Still I keep getting a "SIGABRT"-error (with no other info), so I guess Im doing something wrong...