You are hereBlogs / marv's blog / DashCoding Away!
DashCoding Away!
Ever since I first heard about Mac OS X Leopard's new features, I have been looking forward to Web Clip, that allows you to extract arbitrary content from a website, and wrap it in a Dashboard widget. As I planned, this would be put to good use on my University's cafeteria page.
Unfortunately though, my Uni puts up the menu for the whole week in one big screen-filling table. As my buddy Meck soon figured out, a trick is to shrink the display size in Safari (command-minus), and to then apply Web Clip. This solves the problem of fitting the large table onto a smaller screen. However, it is still not optimal. Instead of seeing the whole week, it would make much more sense to see the menu for the current day only. For this to work, Web Clip would somehow have to know today's date, and then magically extract that portion from the table that corresponds to that date. Obviously, that can't be done automatically.
So I fired up DashCode, Apple's new widget creation IDE, and began hacking away. I must say, that although I have never implemented a Dashboard widget before, nor have I even ever touched JavaScript, it took me only a few minutes to understand how things worked in DashCode. The interface is that good. About an hour (and many opened tabs on JavaScript commands in Safari) later, my widget was completed. I now have a Dashboard widget that gives me the menu for today only (see screenshot below). Granted, it contains some ugly html regex string processing, but it gets the job done. I must say, that for only briefly mentioning DashCode on their page, I would have never expected it to be such a sophisticated yet simple to use app. I doubt this will be my last widget.
- marv's blog
- Login to post comments
- Login to post comments
- Login to post comments
- Login to post comments
- Login to post comments
- Login to post comments
- Login to post comments