fill the void

Posts from February 2010

Codesigning on Different OS Versions

A couple days ago, I was trying to codesign the latest application bundle when I got a very strange error message: bdunagan$ codesign -f -s ‘EMC Corporation’ ‘Retrospect.app’ codesign_allocate: for architecture i386 object: /Retrospect.app/Contents/MacOS/Retrospect malformed object (unknown load command 5) Retrospect.app: object file format invalid or unsuitable Googling for those exact phrases lead nowhere. Eventually, [...]


Create iTunes Link Arrows

iTunes has a great user interface affordance for adding actions to text: clickable arrows embedded right next to the text. (Perhaps Apple wanted to avoid an interface filled with blue, underlined text.) I haven’t found any formal name for them in Apple’s HIG, so I call them link arrows (or jump arrows). Sadly, this is [...]


Cocoa Tip: NSApp‘s currentEvent

Let’s say I want to detect a modifier key. This information is embedded in every NSEvent object as flags in the modifierFlags attribute. But what if my current method isn’t passed an event? The answer is not NSApp‘s nextEventMatchingMask. I explored that option for too long before moving on. The answer is NSApp‘s currentEvent. With [...]


Cocoa Tip: Continuous Updates and Bindings

Today, I was looking at a UI bug where the value of an NSTextField, populated through Cocoa Bindings, wasn’t getting saved. I tabbed over to the field, changed the value, tabbed over to the blue “Done” button and hit Space. Value saved. No bug. So I tried following the steps to reproduce exactly. Click in [...]


iPhone Tip: Rotating UIView

The iPhone OS’s accelerometer tells me the exact x, y, and z orientation of an iPhone or iPod Touch. Which is freakin’ awesome. To demonstrate how easy it is to leverage, I wrote a bit of code to rotate a UILabel in a simple Utility app. The controller sets itself as the delegate for UIAccelerometer [...]