I have a ListBox ("listDisplay") that is initialized with an empty list ("workingList") on a form.
As the user works through the form, new entries are added to "workingList". Is there a way to force "listDisplay" to redraw itself with the updated "workingList" on demand? I've tried <<UpdateWindow, but that didn't do the trick.
If that doesn't work, how can I tell "listDisplay" to overwrite its currently displayed values with the updated incarnation of "workingList"? I looked through the scripting index but couldn't find the function.
One last thing...if anyone knows a way to circumvent the need for "workingList", I'm all ears. I suppose there's something clever that could be done with calling <<Get on the ListBox itself, but I'm at a loss.
Stripped-down example code:
workingList = {};
New Window( "Example",
<<Modal,
H List Box(
V List Box(
clb = Col List Box( All ),
Button Box( "Add",
workingList = Insert(workingList, clb<<get selected);
//redraw listDisplay?
),
listDisplay = List Box( workingList ),
),
),
);
Also -- why isn't my JSL code being highlighted in the box above? I'm using the "Insert JSL Script" button on the toolbar. Is there something else that needs to be done?