[wpkg-users] wpkg.js TODO list

Daniel Dehennin daniel.dehennin at ac-caen.fr
Mon May 17 14:07:27 CEST 2010

Malte Starostik <malte at malte.homeip.net> writes:

> Hi Daniel,


> I just skimmed over bug 118 and your TODO list; thanks for your work, I'm 
> really looking forward to it! :-)
> Just one minor nitpick though, why are you using the Scripting.Dictionary 
> ActiveX object instead of a plain old JavaScript object?
> var hostAttributes = {};
> hostAttributes.name = "hostname";
> hostAttribute[someAttrName] = someAttrValue;
> seems alot more straightforward to me than Scriptint.Dictionary which AFAIK 
> only exists for VB's lack of support for associative arrays at the language 
> level.

Well, I need to make some tests, but with:
var hostAttributes = new Array();
hostAttributes.name = "hostname";
hostAttributes.groups = "somegroup";

You can not know if the array is empty or not because these attributes
does not modify hostAttributes.length[1].

I use an Scriptint.Dictionary because I needed the .count to test for
null <host />.

I'll give a try to {}.


[1]  http://msdn.microsoft.com/en-us/library/5kh4af6c%28VS.85%29.aspx

Daniel Dehennin
RAIP de l'Orne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20100517/07268d21/attachment-0001.sig>

More information about the wpkg-users mailing list