(If you don’t want to read the tech talk, Download the Desktop Gadget here)
When I released the Reagent Table Widget a few weeks ago, several people asked if I could develop a desktop gadget version for Windows Vista/Windows 7/Mac OS X. I know a little bit about programming (read: very, very little bit), so I assumed coding a desktop gadget would be way beyond my ability. Turns out, not so much.
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<g:background id=”imgBackground” src=”background.png”>
And this is what it looks like:
That would be it… but you have to bundle the gadget with a master file so the OS knows what to do with the bundle. In Windows, this is a short .xml file. On a Mac, this is a .plist file. Both contain meta data like Title, size, author, background image, master size, version, etc. When you open the .gadget or .wdgt file, the OS reads the meta file and runs my mini html file in a chrome-less window, which you see as a Desktop Gadget. It really was much simpler than I though it would be… but only because I could use the W|A embed code (thanks, W|A!)
One of the output options when developing a W|A widget is to have the result flyout below in a continuation of the query window. This is more what users expect in a desktop gadget. So I developed that version of the widget quickly, and made a gadget using the embed code for this flyout version. I thought this would be the solution to all my problems… but for some reason it wasn’t.
So there you have it. A behind-the-scenes look at the development of the Wolfram|Alpha Desktop Gadget. I hope I haven’t bored you completely, and if you’ve made it this far then maybe you know enough about programming to tell me how to fix these problems! So everything’s in one place, you can download the desktop gadgets here. I know I could have just added all this as an update to the original post, but I wanted to make sure this hit your feed readers.