I decided Stopwatch should be a simple menu that lives in the status bar. On startup it will ask you for your WorkflowMax credentials:
WorkflowMax were kind enough to give me a demo account that people can use to try out the application. If you would like to play along at home you can use these credentials:
- Account Key: B65C7527334C4892A96549DBC7B88FB7
- Email Address: firstname.lastname@example.org
Once you have entered your credentials in the Preferences panel and clicked Save, you should see an interface like this:
From right to left the drop down menus will show all your clients, all the jobs for a client and all the tasks for a job. When you click on the task “Design” on the left the timer will start and display a clock and task description in your status bar:
The timer will increment every minute and when you click on it you will be presented with a few options:
You can enter some notes about the task you’re working on, stop the task or start another task (which will also stop the current task). If the task is stopped the time you have worked will be written to disk in xml format, and then posted to the server when you have an internet connection.
Once stopped the task will stay in the status bar and to start it again you can just click start:
You can ownload a self contained app here: http://github.com/isaac/Stopwatch/downloads, or find the source on github here: http://github.com/isaac/Stopwatch. If you want to build the app from source I recommend you install the latest MacRuby nightly build first.
I have bundled a slightly modified copy of the HotCocoa gem into Stopwatch and pushed my changes upstream. Also bundled with the app are a few other libraries: macruby-httpwrapper by Matt Aimonetti and aixmlserialize by Justin Palmer.
I’ll talk more about the technical aspects of the app in later posts, so let me know if there is anything you would like me to cover. Developing a MacRuby app with HotCocoa was a great experience and I was more than happy to have a holiday from Interface Builder and Xcode. If only I could develop iPhone & iPad apps in TextMate and Terminal!