Vista Gadget Development & JavaScript

Posted on September 27, 2007

One of the first things that I noticed when learning how to develop sidebar gadgets was that the code behind them was a combination of HTML and JavaScript. The biggest problem is that it was JavaScript, something that I am not well versed in. I looked through several samples and tried some different samples and pretty much have learned the basics of what I need to know, but some of the commands still require me to reference the web or Google certain topics.

I developed a gadget to display specific weather data from my weather station and leveraged what I learned about JavaScript to use XMLHTTP. It worked fine unto a couple days ago when the gadget stopped responding and couldn’t connect to the datasource even though I can do some from a browser. From what I can tell, I must be hitting some sort of connection limit, or I have an object that is not being nulled out. I did change my code to use synchronous processing on the XMLHTTP object, and that seemed to work, but the gadget will sometimes lock up the whole sidebar. Now, that is a nice bug!

So … not a big fan of JavaScript, but making it work. I do like the error handling against what is available using VBScript. Needless to say, it would be nice if gadgets supported C# or VB.NET natively instead of requiring some type of COM access.

You might find these interesting...

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments