• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: menu-free app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: menu-free app


  • Subject: Re: menu-free app
  • From: Alex Fischer <email@hidden>
  • Date: Thu, 8 Dec 2005 14:35:20 +0100

The code in main() can be something like that:

int main(int argc, char *argv[])
{

NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];

[NSApplication sharedApplication];

[NSApp setDelegate: [myAppDelegate new]];

[NSApp run];

[pool release];

return 0;
}

"myAppDelegate" can be a custom subclass of NSObject. If it implements the NSApplication delegate methods it will get the corresponding application launch and finish events. Have a look at the corresponding documentation of NSApplication.


Alexander Fischer
Basasoft, S.L.

c/ Bahía de Cadiz, 65 / 2º D
28042 Madrid

www.basasoft.com
email@hidden



On Dec 8, 2005, at 12:50 , Daniel Child wrote:

Hi again,

I am still looking for a way to set up a menu-free app. I thought this might help:


#import <Cocoa/Cocoa.h>

int main(int argc, const char *argv[])
{
[NSApplication sharedApplication];
[NSBundle loadNibNamed:@"TestPanel" owner:NSApp];
[NSApp run];
return 0;
}

Unfortunately, the execution gets canceled because there is "no launchable application to run." Does anyone know what I am missing? Essentially, I want to launch a helper application that contains a window with a bunch of useful tools. I'm using ProjectBuilder and 10.2.8. Thanks.

Daniel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: menu-free app
      • From: Daniel Child <email@hidden>
References: 
 >menu-free app (From: Daniel Child <email@hidden>)

  • Prev by Date: Coredata and NSTreeController
  • Next by Date: Re: NSObject Foundation tool memory issue?
  • Previous by thread: Re: menu-free app
  • Next by thread: Re: menu-free app
  • Index(es):
    • Date
    • Thread