Category Archives: Mac Hacking

Centering A Dialog Under A Status Item In Cocoa

So you have an NSStatusItem, and you want it to pop a dialog for whatever reason, perhaps a settings window.  Where should that dialog be positioned?  If you’re not placing it centered on the main screen, you probably want it … Continue reading

Posted in Cocoa, Mac Hacking | 11 Comments

Radiance: Stupid Developer Tricks

As some of you likely know now, I’ve been working on Radiance 2.0, which will hopefully be a significant improvement.  The current application is a hack at best; I wrote it for me rather than for the masses.  I’m working … Continue reading

Posted in Mac Hacking, Radiance | Comments Off on Radiance: Stupid Developer Tricks

Locking And Unlocking Files From Terminal

Ever needed to change finder’s lock bit on a file from the command line?  Well, it isn’t really a finder thing.  To wit: # Lock a file $ chflags uchg /my/favorite/file # Unlock a file $ chflags nouchg /my/favorite/file I … Continue reading

Posted in Mac Hacking | Comments Off on Locking And Unlocking Files From Terminal

Radiance 1.2: Now Supporting Mountain Lion

So I finally got around to updating Radiance for Mountain Lion, which was more difficult than it sounds. The old version used the undocumented O3Manager API to control display brightness, but Apple removed it in 10.8.  External displays can’t be … Continue reading

Posted in Mac Hacking, Mountain Lion Hacks, Radiance | Comments Off on Radiance 1.2: Now Supporting Mountain Lion

Guide To Blocks & Grand Central Dispatch

I needed extremely simplistic concurrency support for an application I’m working on, and that led me to stumble over a 2009 article on Grand Central Dispatch.  I have to say, it’s one of the cleaner implementations I’ve seen, and I’m … Continue reading

Posted in Mac Hacking | Comments Off on Guide To Blocks & Grand Central Dispatch