Tip of the Hat

June 28, 2010

I saw (via Kottke) that Steve Carrell says he will be leaving The Office at the conclusion of the seventh season. As someone who was a fan of the original The Office (the British one, you know) and who was dismayed to learn that The Office was coming to NBC (Are there no good, original ideas for shows waiting to be made? Are we so devoid of creativity that we have to adapt every hit BBC show?), and who, after several years, came to have a certain level of respect for the new adaptation The Office, I am happy to read this news. Not that I had reason to suspect otherwise, but I’m glad somebody over here knows how to quit when you’re ahead.

Part of the charm of the original The Office, part of what made it special, was that it was comprised of two seasons, a wonderful “Christmas special” tying up some loose ends, and poof. The End. Very neat, very very good, and complete. When every indication is that content creators cannot let go of anything, that every property must be propped up again and again for milking (c.f. endless classic movie remakes, even prequels to long-thought-complete trilogies, etc.), it is refreshing to see a message that’s all too rare: My work here is done; it’s time for something new.

Comments

Fun with Blocks (in Objective-C)

June 28, 2010

I’ve been working on a Mac application recently that’s 10.6-targeted, which has afforded me a multitude of opportunities to use blocks (Apple’s C language extension introduced in Mac OS X 10.6) to get some tricky features written with a level of grace that previously wouldn’t have been possible.

If you’re a Mac or iOS developer and you’re wondering what good blocks are outside of NSOperationQueue/Grand Central Dispatch, or if you’d like to see some fun ways to take advantage of blocks, check out the most recent installment of Ask Big Nerd Ranch on using blocks in Objective-C, authored by yours truly.

BNRBlockView (gist) is my favorite of the bunch, and the NSThread additions are invaluable building blocks (pun not intended, void where prohibited).

Comments

NSBackgroundStyleRaised Rx

May 12, 2010

I was having quite a bit of trouble getting NSBackgroundStyleRaised to work on my NSView subclass’s label, creating the NSTextField programmatically. I tried fiddling with the background color, I tried disabling my drawRect:. Really hard.

The strange thing was that it was working on labels I had created in Interface Builder but was setting the background style on programmatically. I didn’t find the answer until I looked closely at the settings that Interface Builder makes on labels. Here’s the solution:

[textField setDrawsBackground:NO];

And now I have a label that looks great on its superview’s gradient background.

Comments
Tags: