Nope, not creating a video game. Hence the word analogous. Here's an example :
Names default to here(14);
cwd = convert file path("./");
New window("Test",
Hlistbox(
tb = tabbox(
"Tab1",
Panelbox("Tab 1",
lb = listbox(filesindirectory("$SAMPLE_DATA")),
buttonbox("Open",
file = (lb << Get Selected)[1];
dt = Open("$SAMPLE_DATA\"||file)
)
),
),
Buttonbox("Recreate",
tabCounter = 1;
text_list = {""};
include(cwd||"/recreateWindow2.jsl")
)
),
Hlistbox(
Buttonbox("Back", tb<<Set Selected((tb << Get Selected)-1)),
Buttonbox("Next",
newtab = Eval(other_boxes[(tb<<Get Selected)]);
tb<<Append("Tab", newtab);
tb<<Set Selected((tb<<GetSelected)+1)
)
)
);
other_boxes = {
PanelBox("Blank, because ... reasons?"),
PanelBox("Column Names",
Collistbox(dt, all)
)
};
Now when I run this I get something like this when I run next to what I get when I press recreate.
Here's after I select a data table and open it then press next.
Here's when I press next again.
Now I'd have you mark the differences between the left and right images. When I say this doesn't work, it's because I tried it. Unless I am misunderstanding what you call working or how to use your script. But my expectation is that the right should look exactly like the left (assuming I've opened the proper data tables). Not only that but all the buttons in all the tabs should also work.