Issue in my App that I was troubleshooting the whole day. I narrowed it down to this very qeird behaviour. Unless I'm missing something, this should not be this way.
I have two tables opened: "Baseball" and "Basketball".
I have this script:
Clear Log();
//dt_current=Data Table("Basketball");
/*Two tables opened: Baseball and Basketball. The table named "Basketball" is selected as current table*/
dt_working=Data Table("Baseball");
Show("This is the dt_working table:");
Show(dt_working<<Get Name());
colNamesList = dt_working << Get Column Names;
show("Columns names:");
show(colNamesList);
colListX = Col List Box (dt_working, all, width(250), maxSelected(1));
show("This is what dt_working still is:");
show(dt_working<<Get Name());
show("But this is what I got in Col List Box:");
show(colListX<<Get Items);
Obviously, I'm trying to create a Col List Box with columns from Baseball Table.
But this is what my log (and the rest of the App) showing me:
"This is the dt_working table:";
dt_working << Get Name() = "Baseball";
"Columns names:";
colNamesList = {Player, Batting};
"This is what dt_working still is:";
dt_working << Get Name() = "Baseball";
"But this is what I got in Col List Box:";
colListX << Get Items = {"School", "CSN", "Durham Sun", "Durham Herald", "Washington Post", "USA Today", "Sports Magazine", "In Sport", "UPI", "AP", "Sports Illustrated"};For some reason even though I specified dt_working to be Baseball and said that Col List Box is created using table dt_working, it populates Col List Box with columns from the current data table that I chose in the tool bar up top.
Another app that generally has different code but that particular part is exactly the same works differently and how I intended it to work. Can somebody help me troubleshoot it further? Why owuld it populate Col List Box not form the table I told it to populate, but from the current table?
In the long run I'm trying to display columns from tables that I select in a different List Box. A similar functionality in another app works just fine. Here no matter what table I click (and run a code similar to one I cited) it always shows columns from the table selected up top.
Thanks,
M.