RobotStudio event

Issues with arrays

Options
Hi,
 

I have noticed a couple of issues with arrays -

 

First:

I bound the text of a DataEditor control with a RAPID array of string, and bound the 0 index for the array to an Application Variable.  It simply doesn't work.  When the app is running, the text in the data editor stays on element 0 of the array, and when I click on it to edit I get the error that the index 0 is invalid for the array.  However I have put  a tpslabel control on the same screen, displaying the app variable (which comes from a ListBox selection), and it updates fine, so it seems that the application variable doesn't hook into the array properly.  Hmmm.

 

Second:

ListBox indexes start from 0, yet in RAPID all array indexes start from 1, so hooking the two together is tedious.  My example is a product selection screen, where the op picks his product from a LostBox (populated from RAPID), and on the same screen some details of that product should be showing up (as per the above issue), so I need the details to correspond to the product selected in the ListBox, but the 0/1 discrepancy makes that impossible.  Perhaps Screenmaker indexes should start from 1 also?

 

Any input is welcomed on this one.

Comments

  • Hello Dean,
     

    Yes, the indexes are not consistent, and this is something that will have to be looked at in the future (and keep compatibility).

     

    Take a look in the release notes, there is a section on Indices and how they are numbered.

     

    Kind Regards,

     

      Steve

     
  • Dean Thomas
    Options
    Thanks for the response, the 0/1 issue is a pain that can (almost?) be programmed around, but more of an issue is the problem whereby binding an array index to a controller data or application variable simply doesn't work - the index appears to stay at whatever you put in the '0 index' property (the little gold 'bound' icon is shown at the property), instead of following the app. var or controller data.   Is this a known problem, or am I doing something wrong?
     
  • carlosmtz2000
    Options
    Hi Dean,
     

    Could you share with us a simple ScreenMaker app with RAPID in order to reproduce the problem

     

    Thanks
    Carlos Martinez
    ABB
  • Hi,
     

    I have uploaded a screenmaker project and RAPID.  build an download to the VC, then run it, I've put comments on the screen about the issues.  Thanks.

    webwiz/753/Module1.zip and also the testscreen zip.