<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> I am converting some of my old dialog boxes to the modal windows syntax and it doesn't appear possible to "get" or "get as list" the results from a list box.
In the old dialog function a list box allowed the user to select one or more items off the list using the control and shift keys. The result was a list of items.
However in the new windows << modal syntax, the list box appears to put things in a list. It appears possible to select items from the list, but how to unload the results into a list that can be used later?
Here is the old code with the list box inside the Dialog Function:
dbox1 = Dialog(
"Select the Week and year number to Summarize",
hlist("Week ", week = editnumber()),
hlist("Year ", year = editnumber(2012)),
" ",
"Select the Areas of Interest",
mpaofint = listbox({"Spots", "Transit Damage", "Bar Code Error"}),
button("OK"),button("Cancel")
);
thesempa = dbox1["mpaofint"];
Here is my attempt to convert to a modal window.
New Window( "Select the Week and year number to Summarize",
<
vlist box(
hlist box(Text Box("Week "), wk = Number Edit Box(0)),
hlist box(Text Box("Year "), yr = Number Edit Box( 2012)),
Text box(" "),
Text Box("Select the Media Problem Areas of Interest"),
mpaofint = listbox({"Spots", "Transit Damage", "Bar Code Error"}),
Button Box( "OK"),
Button Box( "Cancel")
));
These are all the words I have tried to get the list I need, but the log shows a missing value for thesempa every time.
thesempa = mpaofint << get list;
thesempa = mpaofint << get as list;
thesempa = mpaofint << get text;
thesempa = mpaofint << get;
Thanks, I just used the get selected without the button box and that worked.
Put the script within the Ok-button.
Button Box( "OK", thesempa = mpaofint<< get selected)