[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with my first app
From: |
Pierre-Yves Rivaille |
Subject: |
Re: Problem with my first app |
Date: |
Sat, 13 Oct 2001 15:05:56 +0200 (MET DST) |
I don't have the exact same error messages as you, probably because I'm
using gcc 3.0.2. But :
> #include <Foundation/Foundation.h>
> #include <AppKit/AppKit.h>
>
> @interface MyDelegate : NSObject
> - (void) applicationWillFinishLaunching: (NSNotification *)not;
> @end
>
> @implementation MyDelegate : NSObject
should be
@implementation MyDelegate
because inheritance is only specified in the @interface part.
> - (void) applicationWillFinishLaunching: (NSNotification *)not
> {
> NSMenu *menu;
> menu = AUTORELEASE ([NSMenu New]);
should be
menu = AUTORELEASE ([NSMenu new]);
> [menu addItemWithTitle: @"Quit"
> action: @selector (terminate:)
> keyEquivalent: @"q"];
> [NSApp setMainMenu : menu];
> }
> @end
>
> int main(int argc, const char **argv)
> {
> [NSApplication sharedApplication];
> [NSApp setDelegate: [MyDelegate new]];
>
> return NSApplicationMain (argc, argv);
> }
Pierre-Yves
- Problem with my first app, PERON Stéphane, 2001/10/13
- Re: Problem with my first app, Jeff Teunissen, 2001/10/13
- Re: Problem with my first app, Pascal Bourguignon, 2001/10/13
- Re: Problem with my first app, Philippe C.D. Robert, 2001/10/14
- Re: Problem with my first app, Richard Frith-Macdonald, 2001/10/14
- import/include philosophical Was: Problem with my first app, Pascal Bourguignon, 2001/10/14
- Re: Problem with my first app, Philippe C.D. Robert, 2001/10/14
- Re: Problem with my first app, Pascal Bourguignon, 2001/10/14
- Re: Problem with my first app, Nicola Pero, 2001/10/14
- Re: Problem with my first app, Nicola Pero, 2001/10/14