5 Replies Latest reply on Oct 27, 2017 1:07 PM by Davide_Barranca

    Problem with listboxes

    r-bin Level 4

      // run this script

       

      var dlg = new Window("dialog", "");

       

       

      // HERE IS EXAMPLE CODE FROM "JAVASCRIPT TOOLS GUIDE.pdf" FOR CREATIVE CLOUD

       

      // create list box with two titled columns

      var list = dlg.add ('ListBox', [0, 0, 150, 75], 'asd',

      {numberOfColumns: 2, showHeaders: true,

      columnTitles: ['First Name', 'Last Name']});

      // add an item for the first row, with the label value for the first column

      var item1 = list.add ('item', 'John');

      // add the label value for the second column in that row.

      item1.subItems[0].text = 'Doe';

       

      // END OF EXAMPLE

       

      dlg.show();

       

      // line

      // item1.subItems[0].text = 'Doe';

      // cause an error on PS CC2015.5 and CC2018

      // WTF ?