Re: Programatically creating NSMenu?
Re: Programatically creating NSMenu?
- Subject: Re: Programatically creating NSMenu?
- From: Keary Suska <email@hidden>
- Date: Wed, 8 Apr 2009 09:42:34 -0600
On Apr 8, 2009, at 8:53 AM, DairyKnight wrote:
Sorry but I don't really see the connection between that page and my
question?
Sorry, probably answers the wrong question. Anyway, what is the
difference between an apps with an "Application.app directory
structure" and "apps with static Nibs"? If in both cases you have an
application bundle, you are halfway to your answer.
NSApplicationMain() requires a bundle. It can find its resources even
when directly launched via terminal. I expect that using
NSApplicationMain() without an app bundle is undefined, and hence the
behavior you are seeing.
On Wed, Apr 8, 2009 at 9:44 PM, Keary Suska <cocoa-
email@hidden> wrote:
On Apr 8, 2009, at 7:13 AM, Daqi Pei wrote:
I've been trying to create a Cocoa GUI application without IB.
Everything
works fine except for the NSMenu.
After digging over the internet I found a solution from '
http://lapcatsoftware.com/blog/2007/06', by using some undocumented
methods
and member variables.
I succeeded in creating the application, and what I found
interesting is, it
seems that if I run the application from Terminal, no menu
would be shown (the Windows still work fine). The only way to have
the menus
working properly is to create an Application.app directory
structure, and
run from Finder. Apps with static Nibs work fine both running from
Terminal
and Finder.
Again I'm doing this only to understand how the system works. Did I
miss
something or it's just the way the framework was designed?
http://lapcatsoftware.com/blog/2007/05/16/working-without-a-nib-
part-1/
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden