Here is a simple snippet which pops up a list box and when an item is selected it should simply return the item to the log window. In reality I have a function which will do something with the returned item.
However, in JMP 15 it always return the item twice which is odd behavior. Maybe this is an unintended use case and I need to use this widget another way.
myListBox = listBox({"A", "B", "C"}, width(50), maxSelected(1), nlines(3),
<< script(
mySelection = myListBox << getSelected;
print("I selected: " || mySelection[1]);
);
);
newWindow("Test", myListBox);