• 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: creating an app w/o MainMenu.nib
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: creating an app w/o MainMenu.nib


  • Subject: Re: creating an app w/o MainMenu.nib
  • From: Daniel Child <email@hidden>
  • Date: Thu, 08 Dec 2005 16:17:53 -1000

Thanks, Topher. I got this suggestion a little while earlier from Greg and it worked great. (I am still wondering how to add an executable (successfully) to a bundle, but that can wait.)

Using LSUIElement, the app closes automatically on command-Q, which is fine for now. However, your idea of having it close on closing the last window makes sense. I'll try implementing this:

- (BOOL) applicationShouldTerminateAfterLastWindowClosed: (NSApplication *) theApplication

Can I stick it in the controller class?

Daniel


On Thursday, December 8, 2005, at 09:24 AM, Christopher Hickman wrote:


Daniel,

Did you get a good answer for this? Try building a standard Cocoa app (not
document based) and adding LSUIElement in the Info.plist with a value of 1.
That will make your application run without a menu bar. Keep in mind,
though, that if you have a close button on the window and you close it, your
app is still running and has no interface to allow it to quit. Best to have
it be a window without a close button or have it quit on close.

Topher

-----Original Message-----
From: cocoa-dev-bounces+tophu=email@hidden
[mailto:cocoa-dev-bounces+tophu=email@hidden] On Behalf Of Daniel
Child
Sent: Thursday, December 08, 2005 4:20 AM
To: email@hidden
Subject: creating an app w/o MainMenu.nib

Hi All,

I am trying to create an application that does not have a MainMenu, but
that otherwise behaves like a Cocoa app. I tried deleting the nib file
and got an error, so it seems that inside of NSApplicationMain(argc,
argv) there is a required expectation of loading a MainMenu.nib file.
What alternative am I looking for inside of main.c?

Sorry, this is probably a very basic question. If you could point me to
the right documentation, I'd appreciate it. 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
  • Prev by Date: Re: NSToolbar wierdness
  • Next by Date: makeKeyAndOrderFront not working
  • Previous by thread: creating an app w/o MainMenu.nib
  • Next by thread: 2933 errors!
  • Index(es):
    • Date
    • Thread