Archive for April, 2007

Detecting if Headphones are Plugged in

April 25, 2007

Implementing the Selective Muting feature took a bit longer then I expected. I found many posts on mailing lists asking the question of how to detect if something is plugged into the headphones jack, but no complete answer. So here’s how you do it.
Use the CoreAudio.framework, specifically CoreAudio/CoreAudio.h Unfortunately the documentation is [...]

Facebook Integration Delayed.

April 24, 2007

I have been working on integrating IMLocation with facebook. Unfortunately, the current facebook API utterly lacks a way to set the status of a user. Most everything is read-only.
There are two options:
1) Wait for facebook to fix the API. Who knows how long this will take.
2) Somehow simulate a user in a [...]

FAQ

April 23, 2007

I am writing an FAQ for IMLocation. As you can see it is quite small right now, but it continues to grow.
Any questions are greatly appreciated.
Thanks for your help!
(UPDATED 10/1/2007, the FAQ is now 705 words about 11 topics.)

tell application “YourGreatApp” NSAppleScript is here to save the day

April 21, 2007

Cocoa includes the wonderful NSAppleScript class, which lets you embed a high-level AppleScript code snippets in your Objective-C program. AppleScript is the bee’s knees for interfacing with other applications, particularly Apple programs and OS X itself. EDITED TO ADD: Unless you use threads in your program. Here is a more sobering [...]

Bug Endian

April 20, 2007

I’m ashamed to admit that I got bitten by an endianess bug yesterday. It was just a small bug, in a test program, and didn’t affect IMLocation, but boy was my face ‘!der’
It made me realize I don’t test enough on PowerPC (PPC) systems, since I don’t own one anymore. [...]

Selective Muting: Get Out of My Headphones!

April 20, 2007

A feature I thought I would love, but began to hate is automatic muting in “quite” places, like lecture halls. Whenever I take my laptop to a place I have designated as quiet, IMLocation will mute it. This works great at preventing embarrassing beeps during class. But I like to listen to [...]