Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > Mac OS X Development Forums > Mac OS X Development

Reply
 
LinkBack Thread Tools Display Modes
Old 01-10-2011, 10:12 AM   #1 (permalink)
Registered Member
 
Join Date: Sep 2008
Posts: 169
Danneman is on a distinguished road
Default Help setting up webview

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
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...
Danneman is offline   Reply With Quote
Old 01-14-2011, 09:27 PM   #2 (permalink)
Beast Mode
 
Join Date: Dec 2008
Age: 21
Posts: 1,971
Bertrand21 is on a distinguished road
Default

Code:
[webView loadRequest:requestObj];
Should be...

Code:
[[webView mainFrame] loadRequest:requestObj];
__________________
Haters gonna Hate
Likers gonna Like
Bertrand21 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 455
16 members and 439 guests
alexeir, David-T, Dj_kades, foslock, iAppDeveloper, ilmman, j.b.rajesh@gmail.com, mer10, mkjarred, Music Man, myach, pipposanta, QuantumDoja, robsmy, sacha1996, SLIC
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,679
Threads: 94,129
Posts: 402,928
Top Poster: BrianSlick (7,990)
Welcome to our newest member, xzoonxoom
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 09:32 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0