Something’s not right here

For a project I’ve been working on, I had need for a Cocoa widget something like an NSTableView, but that contained variable-height NSViews instead of fixed-height NSCells. Apple doesn’t provide one as part of AppKit, but (I thought to myself) surely someone out there must have already written such a beast, and made it available for me to use.

Well, I was half right.

The Omni Group makes available several Cocoa frameworks that form the foundation of OmniWeb. And indeed, OmniAppKit contains the OAStackView class, which does exactly what I wanted. The one catch, of course, is the Omni Source License, which is not open source compatible. Strike that.

The Camino folks ran into the same problem. They couldn’t use OAStackView either, so they wrote their own version. CHStackView is also exactly what I wanted. And Mozilla source code is very definitely open source. But CHStackView (like most Mozilla code) is tri-licensed under the NPL, GPL and LGPL, none of which are compatible with the MIT-style license I was planning to use. For a while, I toyed with the idea of using the GPL, but eventually decided against it.

So I rewrote this thing yet again. I didn’t use any of Omni or Camino’s code, although having seen their implementations did make mine go pretty quickly. And now I’m relatively happy, since my table-like view works, and the licensing works out the way I wanted. But still, it seems like there’s something wrong that there’s all that source code out there that does exactly what I want, and that I can even download and look at, but cannot use. Were I a more philosophical or political person, I might even have something Important to say about it.

One last note: OAStackView is 254 lines of code and is fairly generic and multifunctioned. CHStackView is 108 lines of code, still fairly generic, but has only as much functionality as is needed for the Camino download manager. My implementation is 21 lines of code, and is hard-wired for my project only, not reusable at all. There’s probably a lesson here, too, but I’ll be darned if I can figure out what it is.

One thought on “Something’s not right here

  1. Pingback: Michael Tsai's Weblog

Comments are closed.