November 22, 2006

Javascript Object Literals

For a while now I've been experimenting with the dojo toolkit. I have been puzzling over what the following meant.

var something =
{ somename: "some value",
anothername: "another value",
more: function () { alert("called"); }

It is hard to come up with a search query for this. At first I thought it might be some sort of dictionary or hash table shorthand. However, I finally found that it was an object declaration shorthand and is equivilent to

var something = new Object();
something.somename = "some value";
something.anothername = "another value";
something.more = function () { alert("called"); };

November 18, 2006

Power Shell for windows

I saw this release of Power Shell. It looks like it will do some Unix commands that I always get tripped up on when I'm running windows. It will work on WinXP and Server 2003. I'm installing and we'll see how it works.