Tab.dirs collection enumeration and is refrencing by index possible?

Is there some way of using an index to access the Tab.dirs collection ?
Getting slight delays in folders with lots of items when enumerating.

How would using an index instead of an enumerator change the delay?

Have you worked out for sure where the delay is?

well i have the index from list view object - msg.index, then i need to enumerate through Tab.dirs to get the path at that index. Was hoping
Tab.dirs[msg.index] would work, but no such luck.

How do you populate listview ?
If you already enumerate for this, you could either :

  • Build a vector during first pass. It will allow index access
  • Make a custom JS object with one property being your item from tab.dirs, give your object a toString method (returning item.name or whatever else you want) and fill the listview with this object.

Edit : for an example of solution 2, see : Keep PC awake until one specific process ends

That is what I have done - works great using vars.Get(vector)[index]

Use parentheses instead of brackets.

Awesome - thanks Alexander, exactly what I was looking for :slight_smile: