• 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: Cocoa menus in Carbon App
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa menus in Carbon App


  • Subject: Re: Cocoa menus in Carbon App
  • From: Eric Schlegel <email@hidden>
  • Date: Sat, 11 Jun 2005 11:30:30 -0700

On Jun 11, 2005, at 10:34 AM, Gen Kiyooka wrote:

On Jun 11, 2005, at 10:15 AM, Eric Brunstad wrote:
You can't have a Cocoa menubar in a Carbon app because it uses a Cocoa runloop, not a Carbon one.



Apparently, under Tiger, the two RunLoop mechanisms have been unified such that Cocoa and Carbon
can be mixed, yet have a single run-loop. I learned this from the Apple DTS engineers during WWDC.


Gen



From what Mark wrote, it seems like he wants to have both Cocoa and Carbon menu items in the main menu bar. Is this what you are saying? I don't think you can have a menubar with both Carbon and Cocoa menu items.

No, I'm simply saying that the run-loop mechanisms under Tiger are unified and as such, the
problem must lie elsewhere. My guess is that the problem would lie in routing messages;
maybe a DTS engineer can weigh-in on this topic. Another approach would be to trace the
message flow in both the Carbon and Cocoa sides and see if the messages are being dispatched
at all, or if they are simply going to the wrong place.

Technically, Carbon and Cocoa have always shared the same runloop since 10.0, since Cocoa has always called the Carbon Event Manager to receive events, and the Carbon Event Manager calls CFRunLoopRun.


However, it's still likely that you would have problems using both Carbon and Cocoa menus in the same application, since you can't have both Carbon and Cocoa controlling the menu tracking loop at the same time - only one framework gets to call MenuSelect - and the other framework probably doesn't have its requirements for proper menu tracking satisfied in that case.

We could look at further integration in this area for Leopard, if that's useful. Please file a bug and send me the bug number if you'd like us to work on this issue. A sample app that demonstrates what you're trying to do would also be helpful.

-eric

_______________________________________________
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


References: 
 >Cocoa menus in Carbon App (From: Mark Suska <email@hidden>)
 >Re: Cocoa menus in Carbon App (From: Eric Brunstad <email@hidden>)
 >Re: Cocoa menus in Carbon App (From: Gen Kiyooka <email@hidden>)
 >Re: Cocoa menus in Carbon App (From: Eric Brunstad <email@hidden>)
 >Re: Cocoa menus in Carbon App (From: Gen Kiyooka <email@hidden>)

  • Prev by Date: Re: IBOutlet & NSTabView
  • Next by Date: Re: Passing more than 1 variable to a method/function
  • Previous by thread: Re: Cocoa menus in Carbon App
  • Next by thread: Dealing with never-alocated bugs
  • Index(es):
    • Date
    • Thread