Re: Creating Cocoa Windows from Command Line Apps
Re: Creating Cocoa Windows from Command Line Apps
- Subject: Re: Creating Cocoa Windows from Command Line Apps
- From: Finlay Dobbie <email@hidden>
- Date: Fri, 21 Jan 2005 16:25:33 +0000
On Thu, 20 Jan 2005 21:11:45 -0500, Raffael Cavallaro
<email@hidden> wrote:
>
> On Jan 20, 2005, at 7:04 PM, The Karl Adam wrote:
>
> > You guys do know that in Panther you can go right into an application
> > bundle and start these applications directly? They work fine.
>
> I'll second this. I do this with lisp command line tools. As long as
> your command line executable, inside the bundle, calls the following
> sequence:
Nobody was ever disagreeing. As long as the application is in a
bundle. Unbundled GUI applications are not supported. And be very
cautious about connecting to the windowserver from arbitrary
commandline tools, especially daemons.
> [NSApplication sharedApplication]; // initializes your application and
> creates the global singleton variable NSapp to point to it.
> [NSBundle loadNibNamed:@"MainMenu" owner:NSapp]; // loads your nib -
> obviously this can be a different name, different path.
> [NSApp run]; // starts your NSapp running.
Why not just call NSApplicationMain?
-- Finlay
_______________________________________________
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