JSCRIPT Collections

Results 1 to 4 of 4

Thread: JSCRIPT Collections

  1. #1
    Arky Guest

    Default JSCRIPT Collections

    Can you create a collection object to enumerate through, or are the only ones the file system collection. Any documentation?<BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: JSCRIPT Collections

    Try the Enumerator object:<BR><BR>http://msdn.microsoft.com/scripting/default.htm?/scripting/jscript/doc/jsobjEnumerator.htm<BR>

  3. #3
    Arky Guest

    Default RE: JSCRIPT Collections

    But that seems to work only on Collections for FileSystem object, or rather predefined collections. Can I make my own Collection?

  4. #4
    Richard A. Lowe Guest

    Default RE: JSCRIPT Collections

    Right the Enumerator is for COM collections ONLY, I think<BR><BR>For your own &#039;collections&#039;:<BR><BR>function CObjects() {<BR>&nbsp;&nbsp;&nbsp;this.Object1 = new Object();<BR>&nbsp;&nbsp;&nbsp;this.Object2 = new Object();<BR>}<BR><BR>Use:<BR>// where itm is an variable name<BR>for (itm in new CObjects()) {<BR>&nbsp;&nbsp;&nbsp;CObjects[itm].toString();<BR>}<BR><BR>Make sense??

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts