Page 1 of 1

Is this a bug or I am I missing something?

PostPosted: 23 Jan 2017 08:34
by zsleo
IW 14.1.4 CGD 3.0.0.115

The code in this event is not working correctly - for me.

Code: Select all
procedure TiwcgjqfrmMedScriptTheraputic.JQDynaTreeJQDynaTreeOptionsSelect(Sender: TObject; AParams: TStringList);
begin
  iwcgjqmx2.Lines.Text := JQDynaTree.SelectedNodes[0];
end;


First time the event is triggered I receive a list index out of bounds.

Every time after the first trigger a value is returned but is the value for the item that was previously selected not the value for the new/currently selected item.

Advice please.

Re: Is this a bug or I am I missing something?

PostPosted: 24 Jan 2017 11:07
by Alexander Bulei
Hi zsleo,

First time the event is triggered I receive a list index out of bounds.


You should check the count of items :)

But anyway, it's a bug with order of execution of javascript.
Fixed and will be available on next beta build.
Thank you.

Best Regards.

Re: Is this a bug or I am I missing something?

PostPosted: 24 Jan 2017 18:43
by zsleo
Thanks Alexander.

Didn't have count check because I did not think count would be less than zero after selected is triggered but I will add it

Thanks

Re: Is this a bug or I am I missing something?

PostPosted: 24 Jan 2017 18:44
by Alexander Bulei
Hi zsleo,

Didn't have count check because I did not think count would be less than zero after selected is triggered


Yes, and when uncheck? :roll:

Best Regards.