Subclassing NSCell – The Easy Way

Mike Ash, a developer at Rogue Amoeba, published an article a while back about subclassing the Cocoa class NSCell in a way that doesn’t make you want to stab your eyeballs with a pen. Having suffered through a lot of this with iRooster, I recognize and appreciate the value present in this article, and I hope it helps save an extra eyeball or two.

http://www.mikeash.com/blog/pivot/entry.php?id=17:
Anyone who’s done enough Cocoa has eventually run into the nightmare that is subclassing an NSCell. While it looks simple enough, actually getting an Interface Builder-generated control to use your NSCell subclass is effectively impossible. You either have to use CustomViews in IB, write an IBPalette, or do a whole lot of tedious and error-prone manual copying of attributes to get everything from the IB-provided cell into your own.

Tonight I’m going to show you a simple class you can add to your project which will make everything Just Work.

Possibly Related Posts:


July 31, 2006

Zeldmania Grips Seattle

Adam Greenfield, Aaron Gustafson, Jason Santa Maria, Khoi Vinh, Eric Meyer, and Jeffrey Zeldman are coming to Seattle for a two-day web design conference. It starts September 18th at the Bell Harbor conference center, just down the street from the Edgewater Hotel, where the Beatles stayed once in 1964.

Early Bird registration is $499 and ends on August 18th. More information is available from the An Event Apart website.

Possibly Related Posts:


July 30, 2006

Haley Joel Osment in Car Crash?

According to CNN, Haley Joel Osment (18 years old, now…creepy) was in a car accident a few days ago. Supposedly he hit a brick pillar in his 1995 Saturn (?!?).

Possibly Related Posts:


July 29, 2006

Check your Accessibility with MSAAVerify

Sara Ford, formerly the de facto head of Accessibility testing for all of Visual Studio (and a Black Belt in Karate, so don’t mess with her), published a handy-dandy utility for verifying the correctness of common MSAA properties and roles on GotDotNet back in 2004. Source is included in VB.NET-form.

MSAA, or Microsoft Active Accessibility, is the technology used to supply additional information describing a user interface, in order to allow users dependent upon assistive technologies the ability to interact with Windows software. There’s a wealth of information on MSDN about MSAA.

Possibly Related Posts:


July 29, 2006

Web Usability Pet Peeve #92: Overriding Common Accelerators

I am a huge, huge, huge advocate of correctly supporting mnemonics and keyboard shortcuts throughout your application. It was, for this reason, that I was very excited when I first learned that you could do the exact same thing for web pages. Movable Type uses this, as do some other websites.

What irritates me to no end, though, is when a website overrides a mnemonic or keyboard shortcut that I use on a regular basis. For example, I use the key combination Alt+D about 50 times a day (literally) to pop myself into the address bar in Internet Explorer. It’s such a rote behavior for me, now, that I monkeyed around with one of Safari’s .Nib files to switch its equivalent keyboard shortcut from Cmd-L to Cmd-D on my Mac.

Movable Type used to (back in v3.2) override the default behavior of Alt+D to provide a shortcut for Delete Entry. This meant that I ran the risk of deleting the new entry every time I finished writing a blog post and flipped up to the address bar to verify the post on my website. Argh!

Movable Type 3.3 Changelog:

24907: Accesskey changes required because of conflicts
BUG FIX: Made a system-wide change to the accesskeys for “delete” and focus on the “quick search” input box because of conflicts in certain browsers. The delete accesskey is now ‘x’ (think: expunge or crossing something out) and focus on the quicksearch input box is now ‘q’.

I am very excited to see that MT 3.3 has removed this behavior (it makes me ecstatic, seriously), but I still run into some websites that have this issue. For example, I just found a mini-review of Mozilla Thunderbird 2.0 Alpha 1. I read it, and then pressed Alt+D to flip to the address bar so that I could check Seattle’s traffic briefly.

Oh, but wait! IE moved back to the top of the page, but I got no focus in my address bar. Argh!

Possibly Related Posts:


July 28, 2006

Microsoft + Hardware Design = Yum

An article from Business Week discusses the innovation going into PCs for the Windows Vista timeframe. My opinion? It’s about damned time. Why is it that we have to settle for dull, ugly, oversized beige hunks of plastic when the competition has shown that a computer can look beautiful?

From the article:

“We want people to fall in love with their PCs, not to simply use them to be productive and successful…We want PCs to be objects of pure desire.”

Possibly Related Posts:


July 28, 2006

Not Zune Enough!

As everyone and their mother probably knows, now, Microsoft is planning on releasing an iPod competitor in time for Christmas 2006. According to Engadget, Zune is actually the name of the brand and the device, and there are, supposedly, more Zune devices coming in 2007.

What Zune brings to the table is an ‘integrated experience,’ where Microsoft provides the backend software, the media service, and the hardware in order to give end-users a better experience than they’d receive with a mix-and-match configuration, of the type you usually get with the Windows/PlaysForSure paradigm today.

I hasten to point out that I know nothing more than I’ve read online, but I’m enough of a gadget junkie to put in a pre-order as soon as I know what I can actually order. Also, I’ve been dying to use some sort of bad pun as a headline and link to that damned tiny guy+bunny flash viral marketing video.

Update – A quote from Mark Pilgrim on Zune:

In tech news, Microsoft has announced a brilliant plan to kill the iPod. They won’t actually tell anybody what it is, and it won’t be compatible with anything else, and it has something to do with a creepy guy stroking a bunny. It’s like I don’t even need to be here. This stuff just writes itself.

Possibly Related Posts:


July 28, 2006

The Unintended Consequences of Software Features

I just found this on YouTube: it’s a video of a new feature with unintended consequences in the video game, MLB 2k6. Basically, a player can jump up to the top of a stadium wall to catch a ball that would otherwise be a home run. Unfortunately, this also seems to apply to the 37′ Green Monster of Fenway.

Possibly Related Posts:


July 27, 2006

Zen and the Art of CSS

I’m sure this will come as old-hat to everyone out there, but on the off-chance you’ve never seen it, I highly recommend checking out and playing around with the CSS Zen Garden. CSS Zen Garden is a demonstration of what is achievable through correctly separating your content from the accompanying presentation, and the results really are spectacular.

Dave Shea, creator of CSS Zen Garden, has also come out with a companion book, of sorts, The Zen of CSS Design.

Possibly Related Posts:


July 27, 2006

Microsoft Design?

Generally, most people don’t associate great design with Microsoft, but the company has been making great strides in this area for the past few years. I just found a link to the official Microsoft Design website through Jensen Harris this morning, and wanted to share it.

Disappointingly, I don’t see any screenshots of Visual Studio on display on the website, but one of my favorite people in the whole company does have her own bio page. I’ve worked very closely with Donna, the Design Manager for Visual Studio, for the past three years, and I’ve always been incredibly impressed with her passion, drive, and commitment to giving Visual Studio’s users the most pleasant, usable, and attractive development tools environment possible. She’s a real asset to Microsoft.

As Donna puts it:

“It’s about an integrated whole and all the products have to work seamlessly together.”

Possibly Related Posts:


July 26, 2006