Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 64-bit Carbon



On 2007-06-13, at 21:10:04, Eric Schlegel wrote:

Are you inferring it's possible to assign a command ID to a menu in a Cocoa app and then grab it from a Carbon event handler I have running (assuming I disconnected it from any Cocoa methods)?

You mean "are you implying". :)

Oops. Intransitive verb. Synonym for "imply" (Concise Oxford, 2nd meaning).


Perhaps better written: "Can I infer that a command ID assigned to a Cocoa menu would be available to a Carbon event handler?".


Yes, that would be possible, assuming that you could assign a command ID to a menu using Cocoa. As far as I know, there's no Cocoa API to do that.


No; primarily just the menu classes (NSMenu and NSMenuItem), which use the Carbon Menu Manager. The Cocoa event system also calls into the Carbon Event Manager to fetch events from the event queue. No other parts of AppKit are implemented on top of HIToolbox, or ever have been.

Perhaps I misunderstood the original statement in my overwhelming desire to _make_ it true. There is no -(MenuRef)getMenuRef for NSMenu similar to getting a WindowRef from NSWindow. Pity. It could go a long way towards interoperability.


However, it's good news anyway. Just trying to see if I could do it lead me to a solution that comes in real handy for a product update due later today.

I started to apply the technique from the now withdrawn QA1061 and it appears that it's grabbing the same events. Just like in the example I'd want to start and stop the event loop but instead of Carbon RAEL, maybe the methods 'run', and 'stop' from NSApplication. Do you think that would be viable? Or am I barking up the wrong tree? I'm willing to do a lot so I can take advantage of the much more elegant Carbon implementation.

Thanks,

Philip Aker
email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Carbon-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: 64-bit Carbon (From: Brad Oliver <email@hidden>)
 >Re: 64-bit Carbon (From: Eric Schlegel <email@hidden>)
 >Re: 64-bit Carbon (From: Philip Aker <email@hidden>)
 >Re: 64-bit Carbon (From: Eric Schlegel <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.