Cocoa

Are you sure you want to localize?

It’s a wonderful fact about the world that humans have thousands of living languages. And a wonderful fact about many software development environments that they provide ways to create versions of applications localized into the most common of those languages. But before localization (or should I say world-readiness) sweeps you off your feet, let me tell you about some unexpected difficulties with Kineme’s first localized application.

90% Easy, 10% Impossible

90% Easy, 10% Impossible Pie ChartFrom time to time, I get these insatiable urges to read what other Cocoa developers blog about. Sometimes they’re informative, sometimes they’re funny, sometimes they read like college textbooks, and sometimes they’re just downright terrible, but I read them anyway. It comes and goes in waves, every 2 or 3 months. A couple weeks ago, one such binge happened, and I started reading Aaron Hillegass’ critique of NSController (since I was hating it at the time, and wanted to feel justified in hating it). In the critique, the following statement was made:

QTKit QCheatKit

QuickTime LogoApple has been busily working to 64-bit-ify all of the frameworks they plan to continue supporting into the future (Snow Leopard and beyond). However, QuickTime is scheduled for some nice Cocoaification, so it didn’t get much 64-bit love. QTKit, the 64-bit impostor, pretends to be the 64-bit way forward, but unfortunately this is far from useful.

QuickTime is all C function stuff, rather verbose and boring. It’s also 32-bit only. The 64-bit front end on it is a framework called QTKit. However, 64-bit QTKit is little more than an impostor that secretly makes things messier during the 32-to-64-bit transition.

NSSound and Enumerating CoreAudio Output Devices

Cocoa’s NSSound provides a blindingly simple way to play back audio asynchronously, and even provides some metadata and control over how the audio is played back.

It uses the default sound device, by default. It gives you the ability to change the output device.

According to the documentation:

- (void)setPlaybackDeviceIdentifier:(NSString *)playbackDeviceIdentifier
 
Specifies the receiver's output device.
 
playbackDeviceIdentifier
    Unique identifier of a sound output device.

That’s it. What is the “Unique identifier of a sound output device”? What format is this “Unique identifier”? How do I get a list of the “Unique identifiers” of the available output devices on my system?

Silicon Dioxide (SiO₂)

QuartzCrystal LogoIn the wee small hours of this morning, Kineme Interactive Media released its first commercial product, QuartzCrystal.

QuartzCrystal is an offline renderer that turns Quartz Compositions into portable QuickTime movies. It supports 3rd party plugins, as well as patches that do not work in safe-mode-only environments (such as QuickTime Pro). It also supports software scene antialiasing, so if you have a Mac with plenty of RAM and a hard-core video card, you can make spectacularly beautiful renderings of your plugins, effects, and compositions.

Beside QuartzCrystal, the only other product that renders and encodes compositions to movies is Apple’s own QuickTime Pro, which doesn’t support plugins, unsafe patches, or antialiasing.

QuartzCrystal Main Window Screenshot

Apple Mail Hack: Move Message To Sent Folder

In the year that has elapsed since I failed to explain why I was using PINE for email, I’ve switched to Apple Mail.

Well, it’s been alright, but much to my regret the improved latency due to keystrokes only traveling around my local machine – instead of through the interweb and back as was the case with PINE on a remote machine – makes it almost justifiable. Almost.

iPhoto-Thunderbird Bridge

iPhoto logoFor years, iPhoto users have been stuck using a limited number of email clients to send their photos easily. This was mostly remedied by the iPhoto Mailer Patcher, but it left out non-applescript aware applications because, after all, iPhoto uses applescript to interface with them. One of the more notable omissions is Thunderbird.

Finally, this void has also been filled, via the iPhoto Thunderbird Bridge. It’s still quite primitive, but all the basics are there for iPhoto-Thunderbird integration.

If you’re an iPhoto/Thunderbird user, give it a whirl.

Leaky NSSpeechSynthesizer

NSSpeechSynthesizer, the Cocoa class responsible for giving applications a voice under OS X, is leaky. Creating and destroying thousands of instances of this class slowly consumes all the available memory in a system, leading to degrading performance and eventual application instability.

The disappointing part is that this bug was first noticed almost two years ago.