Archive for the 'Life' Category

3 Things

Monday, September 27th, 2010

Oh Gee. It has been forever since I blogged on here. Is anyone still listening?

First thing:

Someone emailed me recently to ask how Dropzone tracks the dock icon and how can they do something similar with their own Cocoa app.

My reply is below:

You can poll the accessibility API to query the position of the dock element and then set the window frame to this frame.

This app is invaluable for figuring out the correct accessibility element.

This class will help with the accessibility stuff.

I warn you though, once you start down the road of doing horrible hacks like this there is no turning back and you will need 100s more hacks to maintain the initial hack. It took me months of hard work to make the dock tracking system work well and it still has to use a separate process and constantly takes up CPU to poll the API as there is no notification for when the dock tile size changes.

I STRONGLY urge you to find another way to do whatever you are trying to do that does not require a window over the dock icon.

It got me thinking how clever I thought I was when got the dock tracking system Dropzone uses working. It’s a horribly complicated system involving all kinds of hacks and workarounds, all to give me dragging notifications on the dock icon so I could show the grid of actions. This is something Apple never intended apps in the dock to be able to do.

One example of the kinds of extra hacks it leads to is that if you hit F11 it shifts the hidden window off screen, and dock dragging no longer works. This is annoying for a user if they want to expose the desktop and then drag something onto Dropzone. I can get around this by recreating the window when a show desktop is detected, but then I need a way to detect show desktop activation and there is no API for this either…

If you’re thinking of making an app that does hacks like Dropzone, change your mind and don’t. It leads to inflexible and unmaintainable code that is subject to break at any moment.

Compare Dropzone with more standard, single windowed apps like Things and NetNewsWire. I don’t think they have an easy job either, but at least they aren’t trying to interface with integral parts of OS X like the dock where there is no API and things are liable to break next OS update. It’s fun and novel to break all the rules, but in the end, you won’t feel so great about your app. Trust me. Been there.

Second thing:

People have been asking me if I’ve given up on Dropzone. No I haven’t give up and I’m still selling a few licenses a day which I’m really thrilled about. Thank you all.

Part of the reason I haven’t updated Dropzone in a while is that it’s already doing everything I need.

The other reason is that I’m hard at work developing a new app! This will be a slightly more conventional app than Dropzone - It’s a private social network for sharing links, messages and files using Dropbox as the backend. It’s in still in alpha at the moment, but it’s coming along well and I’m hoping to do a big open beta in month or so to get feedback from a wider audience.

The new app is called Frenzy and its hosted at frenzyapp.com. I have posted a screenshot of the app there. Check it out.

Third thing:

An awesome song and video by a great New Zealand artist. Also… Broken Machine… get it?

Farewell to ‘The West Wing’

Wednesday, January 25th, 2006

The West Wing

It was announced today that the American Political drama NBCs ‘The West Wing’ will be taken off the air after its steady decline in viewers from 17.2 million at its peak to around 8 million since the departure of writer Aaron Sorkin at the end of the forth season. The final episode will screen on May 14 and marks the end of an era for all involved with the show and viewers worldwide.

John Spencer, who played the key role of White House chief of staff Leo McGarry died of a heart attack on December 16th, however the decision to axe the show had been made shortly before then. Ever since Sorkins departure from the show, I noticed John Wells seemed to struggle with the direction it was headed. After dealing with the plot written by Aaron Sorkin in which the presidents daughter is kidnapped, John Wells (ER) is left with a very intense storyline to continue with, but after that the show seemed to begin to struggle with washouts like ‘Access’
which I think would have to mark an all time low in the gradual worsening of episodes. I think most viewers would agree that ‘The West Wing’ was truly in its prime in the first, second third and forth seasons although a frantic attempt has been made in the 6th and 7th seasons to revive the show with a lot of out of the West Wing action on the campaign trails of 7 candidates to replace the term limited President Josiah Bartlet.

It has been a great show and the search for a brilliantly acted, witty, moving and informative drama on American politics is sure to continue for a very long time before anything like ‘The West Wing’ screens again.