Hi - this is probably a very easy one. If I have a list of DisplayBoxes, how can I identify the type of DisplayBox each one is? The following code fragment illustrates the problem, in which I've put a ButtonBox, a NumberColBox and a StringColBox into a list as the 1st, 2nd and 3rd elements respectively. I now want to feed that list into a function that will work through the list, identifying each element in turn and performing some operations on it, depending on what type of DisplayBox it is. The code below simply tells me that each one is a DisplayBox - so it's not quite what I want.
The reason I need to know is that I want to write a function that will work through all the columns in a TableBox - for which I need to know which columns are numeric and which are character. Can it be done without resorting to trying to perform an operation on it that will only work if it is of a particular type (e.g. << get as matrix)? Here's the code:
DisplayBoxList = {};
insert into(DisplayBoxList, ButtonBox("AAA"));
insert into(DisplayBoxList, NumberColBox("BBB", [1, 2, 3]));
insert into(DisplayBoxList, StringColBox("CCC", {"a", "b", "c"}));
for(i=1, i<=nItems(DisplayBoxList), i++, show(type(DisplayBoxList[i])));
Many thanks