Author Archives: Jens Ayton

Fun with the Objective-C Runtime

Ever since Leopard came out, I’ve wanted to do something useful with resolveInstanceMethod:. The opportunity has yet to present itself. However, I have done a couple of really silly things with it, which have until now languished in obscurity in … Continue reading

Posted in Cocoa, Code | 4 Comments

Migratory Code

Of the two people I know of who have tried to get at some of my code releases in the past year, a full 50 % have given up and written a new implementation from scratch because downloading and opening a … Continue reading

Posted in Code | Tagged , , | Leave a comment

Key to QWERTY

Recently on the Twitterwebs, Peter Hosey asked for a library that takes a character and returns the corresponding virtual key code (implicitly, in the U.S. keyboard layout). The intention was to use it to specify default key bindings when binding … Continue reading

Posted in Code | Leave a comment

The Ubiquitous Wiretapping Bill

This is not about programming. It’s about something that actually matters. There’s been a little media coverage recently about a Swedish law that’s been in the works for a while. (The Register, Slashdot on The Register, The Local Edit: and … Continue reading

Posted in Politics | 1 Comment

Hacking your Log Messages

More nasty code inspired by IRC conversations, but this time aimed at the iPhone SDK – although it will work on Mac OS X as well, and on WebObjects 4 for Windows NT, and probably on at least some flavours of NextStep. Simply drop this … Continue reading

Posted in Cocoa, Code | Tagged , , | 4 Comments

Property List Extractors

Continuing a theme of tearing out useful bits of functionality from Oolite, and inspired by recent Twitter exchanges with Craig Hockenberry and Rainer Brockerhoff, here’s some really boring code for you all – gruntwork that you don’t want to repeat, … Continue reading

Posted in Cocoa, Code, Oolite | Tagged , | 1 Comment

Hacking your Crash Reports

In a conversation on #macdev, it was pointed out that the Crash Reporter has an “Application Specific Information:” line when certain Apple apps crash. This obviously warranted investigation, and through the powers of Google it was determined that said investigation … Continue reading

Posted in Code | Tagged , , | 2 Comments

The Mysteries of iCal, Revealed!

Note: As of Snow Leopard, this functionality has been superseded by an official Dock tile plug-in mechanism. One of the minor yet shiny new features of Mac OS X 10.5 is that iCal’s dock icon now shows the correct date … Continue reading

Posted in Cocoa, Code | Tagged , , , , | 23 Comments

A Corny Plug-in

As soon as I saw Gus Mueller’s offer of a free license for anyone writing a decent plug-in for Acorn, I felt moved to exploit his generosity contribute to the nascent plug-in community. So I quickly slapped together a possibly-useful … Continue reading

Posted in Cocoa, Code | 2 Comments

Priority Queue

The Foundation framework: it has some collections. It doesn’t have others. In particular, it doesn’t have a priority queue, which I need. CoreFoundation does, but this is for Oolite so it needs to work with GNUstep. Yes, I could bring … Continue reading

Posted in Cocoa, Code, Oolite | 5 Comments