Thursday, 23 May 2013

Writing a Windows Gadget is hard!

Windows Gadgets suck ... Microsoft has recently discontinued support for Windows Gadgets - in favour of Apps. So any Gadgets fans/freaks out there who might enjoy the challenge of writing a gadget ... like myself ... are out in the cold when it comes to sharing gadgets, or hoping for support on some Sidebar issues ...

Well, it's not like they dismantled Windows Sidebar in Windows 7 ... but it looks like there is no gadget support in Windows 8 ... which kind of sucks because gadgets filled the instinctive need of many computer users to clutter up their desktop with cool techno-looking bars and charts and dials and switches etc...


So, Microsoft, in their infinite wisdom, decided to integrate most of the popular gadget functionality into the actual OS, instead of these little unrelated boxes floating around causing havoc with system resources...

Well, disregarding everything I just wrote ... I decided to write my own gadget - it's still a work in progress, so don't laugh too hard... but I started by studying the gadget format - not too tough to master, basically a folder structure with some XML defining the main files...

Then there is the gadget syntax - specialized html tags to identify elements of the gadget .. not too bad...
Then there is the compulsory JavaScript - luckily I was already learning that... so not too bad there...

Then there is the docking functionality... let me start by telling you that all the examples on the internet have one or other subtle flaw which my SideBar doesn't like ... while debugging the docking code I suddenly "lost" my gadget and it would not appear in the SideBar anymore .. well, ok, I mistyped something - but it's still frustrating to not have anything to debug with besides the tools which come with Chrome ... Oh, and did I mention that gadgets rely on the ActiveX components built into Explorer?

That means that you can debug MOST of your gadget and Javascript code using Chrome ... but for all those Microsoft-specific things there is no actual way to DEBUG a gadget using Internet Explorer ... which is a shame because I rather enjoy playing with my TODOList gadget ... it's very simple, right now it can be docked - which shows a smaller list or undocked - which shows the same list in a larger view ...  fun times :-)
My main plan is to refine the todo list to the point where I enjoy using it - and it will be my default app, since I am a programmer and my mind is inordinately full and prone to dropping details after all these years of juggling crazy amounts of things around in short term memory - plus there are a lot of distractions all around me, since I am the only programmer IN THE COMPANY... which is kind of awesome, The Lone Coder lol!

Once the gadget has been refined to my liking, I would like to use it as a base for a gadget game I would like to write ... something like the old NES Star Force ... which is another mission on its own - but well worth the fun...

So, gadgets suck, but the joy they bring definitely makes it worth the time and effort that goes into creating one...