Re: Carbon Menu in Cocoa app

2008-03-19 Thread Peter Maurer
I have tried the MenuRef _NSGetCarbonMenu(NSMenu* aMenu); but my menuRef always gets 0x0. Is this private API still available ? Did you remember to make the NSMenu actually create its underlying Carbon menu before trying to get it via _NSGetCarbonMenu()? You can do so by temporarily

Re: Carbon Menu in Cocoa app

2008-03-18 Thread Daniel zeilMal
I have a custom view . And I have drew something on this view . I want to add a custom view to a menuItem . But this is not supported before Leopard .So I'm going to ask help to carbon. The main idea is that I get the menuRef from the [NSApp mainMenu] ,and then draw something on that specific

Re: Carbon Menu in Cocoa app

2008-03-18 Thread Kyle Sluder
On Tue, Mar 18, 2008 at 2:25 PM, Daniel zeilMal [EMAIL PROTECTED] wrote: I have a custom view . And I have drew something on this view . I want to add a custom view to a menuItem . But this is not supported before Leopard .So Are you trying to use _NSGetCarbonMenu on Leopard? If so, just go

Re: Carbon Menu in Cocoa app

2008-03-18 Thread Daniel zeilMal
NO , I'm not going to use it on leopard . Cause in leopard , NSMenuItem support setting custom views using API setView:.What I want , just using it in Tiger . extern MenuRef _NSGetCarbonMenu( NSMenu *menu); @implementation MyController OSStatus PictureHandler( EventHandlerCallRef caller,

Re: Carbon Menu in Cocoa app

2008-03-18 Thread James Hober
On Mar 18, 2008, at 11:32 AM, cai qin wrote: I have a cocoa app developed in Tiger . Is it possible that Using a carbon menuRef to get App 's mainMenu? Why not just use public Carbon API? MenuRef carbonMenuBar = AcquireRootMenu(); ... error = ReleaseMenu(carbonMenuBar); //clean up and