tags:

views:

47

answers:

2

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?

A: 

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.

Paul Tomblin
This is flat-out wrong. Apple continued to develop Carbon over the years, even putting it ahead of Cocoa at many points (HIObject, introduced in 10.2, had capabilities that NSObject didn't — ditto for HIView), and they claimed that Carbon would go 64-bit until just a few months before 10.5 was released. Note that I'm not a bitter Carbon developer — I was always Cocoa. I just remember that Apple never presented it as a stopgap until they had decided to kill the framework, and then all of a sudden everyone knew Apple didn't *really, pinky-swear* mean it when they said it was OK to use Carbon.
Chuck
See this Ars Technica article where they point out how sudden Apple's about-face with regard to Carbon was: http://arstechnica.com/apple/news/2007/06/64-bit-support-in-leopard-no-carbon-love.ars Note that 64-bit Carbon had been announced before this, and that this was only four months before Leopard came out.
Chuck
@Chuck, so you're quoting a 2007 article to refute my claim that people had plenty of notice that Carbon was not going to be upgraded in 2009 when the OS went 64 bit? How much warning would you consider adequate, if 2 years isn't enough?
Paul Tomblin
You said they had 10 years. In fact they had four months' warning before Leopard came out. Yes, it has been a couple of years since then, but it's simply wrong to say that this was Apple's course all along. There were no deprecation warnings or "This is just transitional technology" or anything. It was a very sudden about-face. Apple's developer and promotional material for Leopard actually continued to promise 64-bit Carbon even after the project had been canceled — that's how abrupt it was. Even Apple "missed the 64-bit boat" with Final Cut Pro.
Chuck
+4  A: 

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.

Peter Hosey