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

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