Is there a way to input a multi-selection-checkbox of arbitrary length? (SOLVED)
11-11-2015, 07:02 PM
Post: #5
 StephenG1CMZ Senior Member Posts: 1,038 Joined: May 2015
RE: Is there a way to input a multi-selection-checkbox of arbitrary length?
I don't understand why that 2nd MAKELIST didn't generate LST(1...LST(2

But since the INPUT turns list l2 into a string, that MAKELIST isn't needed: one can make the required string directly.

This code seems to achieve what I was looking for:

Code:
  EXPORT BS()  BEGIN   LOCAL ST:="{";   LOCAL COMETS:={"ALL","Halley","Lewkowicz","lots more"};   LOCAL LST:=MAKELIST(0,I,1,SIZE(COMETS));//MAKE LIST FOR RESULTS   LOCAL OKC;   LOCAL TTL:="Select Some";   LOCAL HLP:="HH";   //MAKE STRING FOR INPUT   FOR I FROM 1 TO SIZE(COMETS) DO    ST:=ST+"{LST("+I+"),1}";   END;   ST:=REPLACE(ST,"}{","},{");//COMMA SEPERATOR   ST:=ST+"}";    //MSGBOX(ST);   OKC:=EVAL(EXPR("INPUT("+ST+",TTL,COMETS,HLP,1,1)"));   IF OKC THEN    MSGBOX(LST);   ELSE    //INPUT CANCELLED    //MAY WANT TO EMPTY LST?   END; END;
Many thanks for your help with the syntax.

Stephen Lewkowicz (G1CMZ)
https://my.numworks.com/python/steveg1cmz
 « Next Oldest | Next Newest »

 Messages In This Thread Is there a way to input a multi-selection-checkbox of arbitrary length? (SOLVED) - StephenG1CMZ - 11-09-2015, 06:08 PM RE: Is there a way to input a multi-selection-checkbox of arbitrary length? - StephenG1CMZ - 11-10-2015, 05:04 PM RE: Is there a way to input a multi-selection-checkbox of arbitrary length? - cyrille de brĂ©bisson - 11-11-2015, 06:42 AM RE: Is there a way to input a multi-selection-checkbox of arbitrary length? - StephenG1CMZ - 11-11-2015, 09:09 AM RE: Is there a way to input a multi-selection-checkbox of arbitrary length? - StephenG1CMZ - 11-11-2015 07:02 PM RE: Is there a way to input a multi-selection-checkbox of arbitrary length? - cyrille de brĂ©bisson - 11-12-2015, 06:57 AM RE: Is there a way to input a multi-selection-checkbox of arbitrary length? (SOLVED) - StephenG1CMZ - 08-23-2018, 09:58 PM

User(s) browsing this thread: 1 Guest(s)