Archive for the 'Free Code' Category

What a Difference a Cell Makes

Saturday, June 17th, 2006

I’ve been bothered for a long time by a limitation of NSTextFieldCell that prevents developers from specifying a vertically centered alignment. This is particular annoying in contexts where Apple practically rolls out the red carpet for a particular UI feature, but where taking advantage of that feature is almost guaranteed to produce an ugly result. […]

Drag If You Want To

Wednesday, June 7th, 2006

Handling drags to your Cocoa application is pretty simple: you just have to implement the informal NSDraggingDestination protocol in some view hierarchy object that has been registered for particular drag types. Usually a drag is handled by a specific view that can make sense of the drag’s data type. For instance, an NSTextView will accept […]