Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7000867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:43:42+00:00 2026-05-27T20:43:42+00:00

Hello everyone i need some help. I’m trying to make an application for mac

  • 0

Hello everyone i need some help. I’m trying to make an application for mac in Xcode 4.0 and i want it to display a webpage on launch i have already added the webkit framework and have got some code but its not working. the code is below

The app delegate.m file

#import "AppDelegate.h"

#import <WebKit/WebKit.h>

@implementation AppDelegate

@synthesize window = _window;


@synthesize WebView;

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
    NSString *urlAddress = @"http://www.google.com/";
    NSURL *url = [NSURL URLWithString:urlAddress];
    NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
    [[WebView mainFrame] LoadRequest:requestObj];
}

@end

and the app delegate.h file

#import <Cocoa/Cocoa.h>

 #import <WebKit/WebKit.h>

@interface AppDelegate : NSObject <NSApplicationDelegate>

@property (assign) IBOutlet NSWindow *window;

@property (assign) IBOutlet WebView *WebView;

@interface myAppDelegate : NSObject <NSApplicationDelegate> {
    WebView *myWebView;

}

@property (retain, nonatomic) IBOutlet WebView *myWebView;

@end

If anyone can help please respond asap thanks guys!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T20:43:42+00:00Added an answer on May 27, 2026 at 8:43 pm

    hmm, i’m assuming that code isn’t compiling? (it shouldn’t be! 🙂 ). the .h should look something like:

    #import <Cocoa/Cocoa.h>
    
    #import <WebKit/WebKit.h>
    
    @interface AppDelegate : NSObject <NSApplicationDelegate> {
        WebView *_myWebView; // not needed if you're using the latest xcode
    }
    
    @property (assign) IBOutlet NSWindow *window;
    @property (retain, nonatomic) IBOutlet WebView *myWebView;
    
    @end
    

    and the .m:

    #import "AppDelegate.h"
    
    #import <WebKit/WebKit.h>
    
    @implementation AppDelegate
    
    @synthesize window = _window;
    @synthesize myWebView = _myWebView;
    
    - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
    {
        NSString *urlAddress = @"http://www.google.com/";
        NSURL *url = [NSURL URLWithString:urlAddress];
        NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
        [[self.myWebView mainFrame] loadRequest:requestObj]; // note the lower case 'l' in 'loadRequest'
    }
    
    @end
    

    this assumes you’ve connected the webview in the .xib with the myWebView property.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello everyone I'm trying to improve my Java skills by solving some problems from
Hello everyone here... I need to build up a swing application related to vehicle
Hello Everyone, I am working on an application in which i need to save
Hello everyone, I need help on creating a button like in the above picture.
Hello everyone I am trying to make since of what I am doing wrong
Hello everyone I am trying to resize an image of 700kb with imagecreatefromjpeg. This
Hello everyone I'm trying to work with jboss messaging, does anyone knows the default
Hello everyone I am new to blackberry and I want a textfield that scroll
Hello everyone I would have a value for the need to save every time
hello everyone im trying to create this tweak that copies a file from one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.