Dan Wood: The Eponymous Weblog

Dan Wood is co-owner of Karelia Software, creating programs for the Macintosh computer. He is the father of two kids, lives in the Bay Area of California USA, and prefers bicycles to cars. This site is his weblog, which mostly covers geeky topics like Macs and Mac Programming.

Useful Tidbits and Egotistical Musings from Dan Wood

Categories: Mac OS X · Cocoa Programming · General · All Categories

Sat, 30 Jul 2005

I just heard about Sinbad, via the Watson User's Group at Yahoo!. It has promise... It looks interesting.

Fri, 29 Jul 2005

One user interface element that has become common in Mac applications is a warning alert sheet with a checkbox saying "Do not show this warning again" (or words to that effect). The idea is that the user is given ample warning about some impending action, but is given the opportunity to prevent future warnings.

The general idea is to bring up an alert sheet by loading a custom nib with the checkbox in it, and to have the preference to stop showing the sheet attached to a NSUserDefaults key. That's pretty straightforward. The question is how to create the sheet and invoke the action after confirmation, while keeping the calling code as simple as possible.

I came up with an interesting approach to the problem, using an approach similar to a Trampoline Object. Essentially, you replace a warning-less call to a method:

    [self doSomeWarnableAction:param1]

with a call like (simplified here):

    [[self confirmFirst (...) ]
        doSomeWarnableAction:param1];

See more ...

Thu, 21 Jul 2005

Living in California, U.S.A., I feel like I'm not only living in the country that is the laughing stock of the world these "W" days, but the state that is the laughing stock of the country, with a "Governator," not a real Governor, at the helm. This is the guy who was elected on the promise of getting rid of the special interests — who seems to be spending most of his energy collecting big bucks from big corporate interests.

Now, we're bracing for a "Special Election" in November which he's forcing down our throats. Six right-wing, big-business initiatives that couldn't wait until next year, since Arnold would not be allowed to campaign for them if he waited. So we will have an election that will waste $80 million of taxpayer money.

The first six — 73 through 78 — are just disgusting. One unnecessary measure turns school teachers into scapegoats for problems with our educational system; another guts the recent Proposition 98 for minimal school funding. (Clearly, Arnold hates teachers!) A "parental notification" measure won't actually do anything to actually reduce abortions. Another kicks off an early reapportionment, years since the latest census. Another stifles the political voices of unions. And then there's the fake prescription drug "discount" measure that doesn't solve any problems — at least there's a counterproposal (Proposition 79) that is competing ... however, this means that big bucks will be spent by the pharmaceutical industry trying to pass theirs/Arnold's version.

Inspired by the fact that these deplorable measures are all numbered in the "seventies", I envisioned and executed an image of Arnold as a Disco Dancer from the seventies. Here is its world premiere! Feel free to ... uh ... view.

Arnold Schwarzenegger head, John Travolta body, dancing from Saturday Night Fever

(Larger version available.)

Mon, 18 Jul 2005

Hopefully this has happened transparently, but I have moved my weblog to my personal domain, so that I will feel more comfortable with personal & political rants. We will soon be making real use of the Sandvox weblog soon for "business" stuff.

The new RSS feed(s) for my personal weblog (in case you only want some pieces) are as follows ... although the old feeds and links should forward indefinitely.

Of course, I will probably migrate this to Sandvox at some point, when I can get an automator action for that...

Wed, 13 Jul 2005

Interesting way to collect technical info about your Mac

This is an advanced tip about collecting all kinds of technical information about your Mac's configuration. It packages up all kinds of configuration information, zips it up, and puts it into a temporary folder. Maybe somebody reading this will find it an interesting tidbit. It's an advanced, command-line tool so don't worry about it if you're not a command-line power user!

sudo /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/Resources/get-mobility-info

Wed, 06 Jul 2005

Astute readers may have noticed that we have a Sandvox development weblog set up at the Karelia site, but not much weblogging going on. Well, we have had the hood open since WWDC, re-tooling a lot of the internals of Sandvox, One of our big priorities is getting the application back to a state where we can use it to post to the weblog on the site; once we have hit that point, we will start posting more Sandvox information there.

So what are we working on? Terrence, after talking to some helpful Apple engineers at the conference, has streamlined the way that we store data in the document files which will also make it easier for third-party developers to add in their own plug-in types. I've been focusing on user interface elements (inspired, as usual, by some WWDC sessions) and Webkit editing (which is starting to really rock thanks to helpful Apple engineers and the fact that WebKit is now open-source).

Meanwhile, we're continuing to get more great site designs built. We showcased six designs on the Karelia home page for our announcement a few weeks ago; we have about nine more either finished or in the pipeline. (Yes, we'll eventually publish a spec for third-party designers to contribute their own.) Here's one that I just love called "Trippy Bubbles". (Terrence, BTW, is planning on showcasing another design on his weblog at some point as well.)

We're still tallying "votes" for favorite design of the six we are showcasing on the Karelia site. We plan on announcing the winner in the next couple of weeks!

Sat, 02 Jul 2005

Making the rounds in the blog-o-sphere™ these days is Wil Shipley's talk and slides of his advice on programming and running a business. A great (and funny) presentation, it's directed towards students but actually enjoyable by all. Though I didn't directly have the benefit of Wil's advice when starting Karelia, I have since appreciated his tidbits of wisdom.

I just wanted to put in a plug for the session at last year's O'Reilly Mac OS X Conference (in which Wil, I, and several Mac developers participated), which is available in audio format, courtesy of Niall Kennedy. Just in case anybody missed it the first time around.