Malte Starostik <ma...@malte.homeip.net> writes: > Hi Daniel,
Hello, > 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 {}. Regards. Footnotes: [1] http://msdn.microsoft.com/en-us/library/5kh4af6c%28VS.85%29.aspx -- Daniel Dehennin RAIP de l'Orne
pgpk9R6gKNvAA.pgp
Description: PGP signature
------------------------------------------------------------------------- wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/ _______________________________________________ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users