Hey,
I'm trying to have an array that holds information as a key and display boxes as values but I can't seem to get their correct status(for checkbox) afterward- all check boxes returns as 0 even if pressed.
I cant seem to understand if that is due to a syntax issue or something deeper, here is my code:
MainDisplayBox = V List Box();
DisplayArray = Associative Array();
current data table(dt);
For Each Row(
DisplayArray[char(:Col1)] = list(checkbox(""),hlist box(
text box(char(:Col1)||": suggested value: "),
Text Edit Box(round(:Col2,3)),
));
MainDisplayBox << append(hlistbox(eval((DisplayArray[Col1][1])),eval((DisplayArray[Col1][2]))));
);
OffsetCloseButton = Button Box("close",OffsetWindow<<Close Window);
OffsetWindow = new window("Reticle offset analysis",vlist box(OffsetCloseButton,MainDisplayBox));
keys = DisplayArray << get keys;
pressed = list();
for(j=1,j<=nitems(keys),j++,
if(eval(DisplayArray[keys[j]][1])<<get==1,insert into(pressed,keys[j]));
);
Thanks,
Ben.