Category Archives: Cocoa

On the Mac App Store

When the Mac App Store was announced, I said to someone, “‘Convenient’ isn’t the same as ‘good for you’.” This might look slightly odd in a community dedicated to improving people’s workflows, so I’d like to expand on it. (I … Continue reading

Posted in Cocoa, Politics | 2 Comments

Almost elegant cave man debugging

Recently, the Twitternets pointed me at Vincent Gable’s blog post, The Most Useful Objective-C Code I’ve Ever Written. It is indeed quite useful; given a semi-arbitrary expression, it prints out the value, using @encode() and macros to minimize drudgery.

Posted in Cocoa, Code | Tagged , | 6 Comments

Proposal: generics (and some other stuff) for Objective-C

Some time ago, Greg Parker asked the Twitternets what we’d like to see in a purely hypothetical Objective-C-without-the-C language. Someone — I believe it was Landon Fuller — pointed at an article about the Strongtalk type system for Smalltalk. I … Continue reading

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

Multi-type Save Panel Controller

As a change of pace, I thought I’d post some code that doesn’t go out of its way to be bad. JAMultiTypeSavePanelController is a class (abstracted from ImageIO Export for Acorn) to handle the case where you want to offer … Continue reading

Posted in Cocoa, Code | Leave a comment

Constant objects for fun and non-profit

The @"foo" operator for constant NSString objects in Objective-C is extremely convenient. Indeed, if it wasn’t there, programming with Cocoa would be a royal pain. Many of us have at various points wished there was equivalent syntax for NSNumbers, and … Continue reading

Posted in Cocoa, Code | Tagged | 3 Comments

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

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

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