Post Reply 
Is there a way to input a multi-selection-checkbox of arbitrary length? (SOLVED)
11-11-2015, 07:02 PM
Post: #5
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
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Is there a way to input a multi-selection-checkbox of arbitrary length? - StephenG1CMZ - 11-11-2015 07:02 PM



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