Skip to content

Vista Gadgets Part 2

March 25, 2009

I feel dirty.

Vista Gadgets have disabled Alert and Confirm dialog boxes to avoid annoying end users, but when they did this it also made it hard to quickly debug the gadgets as there is no easy way to output exactly what is going on.  Yes, I could install Visual Studio and use its debugger, but I’m lazy right now and just want to know the value of a string.  I tried writing to a <div> but it was problematic because I didn’t know if the issue was I just couldn’t see the <div>, it wasn’t writing to it, or the data was an empty string.

The solution was to call Visual Basic from JavaScript.  Icky, but it worked.  While Microsoft stopped JavaScript alerts from working on the desktop, apparently they forgot to stop Visual Basic from loading MsgBox dialogs in the same instance.  It’s not a bug.  It’s a feature!

Advertisements

Comments are closed.

%d bloggers like this: