问题
I get the impression that Carbon Human Interface Toolbox does not work in 64-bit binaries.
Apple's documentation says:
The Carbon Help Manager is not available to 64-bit applications.
...
The Control Manager is not available to 64-bit applications.
...
The Data Browser is not available to 64-bit applications.
...
I just want to verify that:
There is no work-around around this.
If this is simply the case. Why don't Apple's documentation simply state it as such?
回答1:
I get the impression that Carbon Human Interface Toolbox does not work in 64-bit binaries. … I just want to verify that:
- There is no work-around around this.
- If this is simply the case. Why don't Apple's documentation simply state it as such?
It does. From the 64-bit Guide for Carbon Developers:
In particular, the APIs used to implement a Carbon user interface are generally available only to 32-bit applications. If you want to create a 64-bit application for Mac OS X, you need to use Cocoa to implement its user interface.
From the HIToolbox Release Notes:
The HIToolbox and HIServices frameworks are available for use in 64-bit applications, but not all APIs are available. In particular, the HIToolbox APIs for creating and managing UI elements (menus, windows, and views) are not available. Use Cocoa to build the UI for a 64-bit application.
A few HIToolbox and HIServices functions (such as the Carbon Event Manager's hotkey API) and a lot of types (such as PhysicalKeyboardLayoutType
) and constants (such as the ANSI key codes in Event Manager) escaped the axe, which is why the frameworks themselves are not deprecated/unavailable.
回答2:
Carbon was created as a stop-gap to help people transition from OS 9 to OS X. It's been 10 years, you should be transitioned by now. Note that you're in good company - Adobe refused to move off of Carbon for CS until they realized they were going to miss the 64 bit boat when Snow Leopard came out.
来源:https://stackoverflow.com/questions/2849320/no-carbon-human-interface-toolbox-in-osx-64-bit-binaries