Re: cocoa app from scratch
Re: cocoa app from scratch
- Subject: Re: cocoa app from scratch
- From: "Dennis C. De Mars" <email@hidden>
- Date: Sat, 31 Jul 2004 11:53:25 -0700
I doubt that would work. It is true that Cocoa internally uses the
Carbon Menu Manager to put the menus on the screen, but if you made the
menu bar yourself you would not have a way of informing Cocoa about the
Carbon objects you have created, and it undoubtedly needs access to
those, as there is a lot of auxiliary Cocoa info that gets associated
with those objects.
Finlay may be right, it is possible that the menu bar is the one case
where Cocoa has not provided any (public) alternative means to create
the menu bar other than the nib file. If one was absolutely fixated on
doing everything programatically, though, you could create a nib file
that has nothing but one essentially empty menu bar (you might have to
have the Apple menu, though...) and fill the rest in via the NSMenu
class.
- Dennis D.
On Jul 31, 2004, at 8:03 AM, Scott Thompson wrote:
Actually IIRC there were some issues with setting up the menu bar when
I tried this. You needed to do something crazy like instantiate a
private Apple menu class, add it and then remove it. This was circa
10.1, things may have changed, and I may have been missing
something...
I very well could be wrong, but I suspect that this is no longer the
case. Although there may not be a "pure Cocoa" solution that you can
use.
What I understand from talking to Apple Engineers, there is no "Cocoa"
menu bar. The Menu Bar is handled by the same code for both Carbon and
Cocoa. If that is true, then you could easily create and establish a
menu bar by using Carbon calls.
I've not tried it, however, so it my suspicions may be wrong. Might be
fun to test it out, though :-)
Scott
--
Macintosh Software Engineering Consulting Services
Visit my resume at <http://homepage.mac.com/easco/RSTResume.html>
[demime 0.98b removed an attachment of type
application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.