Page 1 of 1

Set Selected Index : 47 out of bounds

PostPosted: Wed Mar 02, 2016 2:21 pm
by Bernd.N
Does someone know the root cause for this message?
It appears every once in a while, average is about once a day. The 47 can be another value.
I could not find threads regarding Servoy, but when searching on Google, setSelectedIndex will show up and also out of bounds, so maybe it is a Swing or Java issue?

When this showed up, I was just scrolling a large table with my page down key on the keyboard.
After pressing OK, you can work on, so it is not fatal.

Re: Set Selected Index : 47 out of bounds

PostPosted: Wed Mar 02, 2016 5:20 pm
by ROCLASI
Hi Bernd,

Do you have any code linked or on that form that holds that function setSelectedIndex ?
It's a function of controller or foundset.

Re: Set Selected Index : 47 out of bounds

PostPosted: Wed Mar 02, 2016 8:38 pm
by Bernd.N
Hi Robert,
we use the function setSelectedIndex about 30 times in our solution, but when looking at the code, we can not see that one of those would be triggered by just scrolling through that table.
So my assumption is it stems not directly from our code but could be triggered in an indirect way.

When thinking about which code could be fired while just scrolling through such a list, my only idea is: a calculation.
We have several non-stored calculations associated with that table, like this one:

Code: Select all
function clc_warning_triangle()
{
   if ((Math.abs(p_total_order_value - p_total_order_value_pe) > 200)  ||  (Math.abs(p_remaining_not_planned) > 500)  ||  p_remaining < -10) {
      
      return '<html> <img src="media:///exclamation-circle_f08080_16.png"> </html>';
   }
   else {

      return null;
   }
}

Re: Set Selected Index : 47 out of bounds

PostPosted: Wed Feb 15, 2017 12:04 pm
by LXS
Hi Bernd,

could you solve the issue with setSelectedIndex out of bounds or do you know where it comes from?
Some customers report about these error messages sporadically, too.

Thanks,
Alex

Re: Set Selected Index : 47 out of bounds

PostPosted: Wed Feb 15, 2017 12:51 pm
by Bernd.N
Hi Alex,
no solution so far. I assume it's root cause is a calculated field from one of the columns.
It appears only on our largest and most complex table form.
So if I would have time to tackle this now, I would try to reduce the calculations or replace them by stored calculated fields, so that the calculations will not always fire as soon as the table form will show.