Caselle numeriche dinamiche basate sugli elementi dell'elencoNello script seguente ho un elenco di 3 elementi e sto cercando di creare una nuova finestra in cui l'utente può immettere alcuni valori per ciascuno degli elementi:
myList = {"apple", "banana", "orange"};
nw = New Window( "Enter Numbers",
<<MODAL></MODAL>I use the for loop because the number of the items in the list "myList" changes. So that I would like to happen also for the Number Edit Boxes. However, I get back the following:
<SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Georgios_Tsim_0-1724768252918.png" style="width: 400px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="Georgios_Tsim_0-1724768252918.png" style="width: 177px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="Georgios_Tsim_0-1724768252918.png" style="width: 177px;"><span class="lia-inline-image-display-wrapper" image-alt="Georgios_Tsim_0-1724768252918.png" style="width: 177px;"><img src="https://us.v-cdn.net/6038925/uploads/images/67570iD9F0C812C0FDFAEA/Georgios_Tsim_0-1724768252918.png" role="button" title="Georgios_Tsim_0-1724768252918.png" alt="Georgios_Tsim_0-1724768252918.png" /></span></SPAN></SPAN></SPAN>
Ideally I would like the values that the end user enters to be saved in a list.
<LINGO-LABS id="lingo-labs-785852" slang="en-US" mode="CREATE"><LINGO-LABEL>Automazione e scripting</LINGO-LABEL></LINGO-LABS>Re: Caselle numeriche dinamiche basate sugli elementi dell'elencoEcco l'approccio che adotterei
Names Default To Here( 1 );
myList = {"apple", "banana", "orange"};
myVList = V List Box(
Text Box( "Enter the values" ),
lub = Lineup Box( N Col( 2 ), ),
H List Box( Button Box( "OK" ), Button Box( "Cancel" ) )
);
For Each( {box}, myList,
lub << append( Text Box( Eval( box ) ) );
lub << append( Number Edit Box( 42 ) );
);
nw = New Window( "Enter Numbers",
<<MODAL></MODAL>
<P><SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1724769101857.png" style="width: 400px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="txnelson_0-1724769101857.png" style="width: 152px;"><span class="lia-inline-image-display-wrapper" image-alt="txnelson_0-1724769101857.png" style="width: 152px;"><img src="https://us.v-cdn.net/6038925/uploads/images/67571i70B066AB4D35A5C0/txnelson_0-1724769101857.png" role="button" title="txnelson_0-1724769101857.png" alt="txnelson_0-1724769101857.png" /></span></SPAN></SPAN></P>
<P> </P>Re: Caselle numeriche dinamiche basate sugli elementi dell'elencoEsistono diversi modi per farlo.
Puoi utilizzare diversi metodi per raccogliere i risultati, puoi usare XPath
Names Default To Here(1);
fruits = {"apple", "banana", "orange"};
value_collector = V List Box(
Text Box("Enter the values"),
lub = Lineup Box(N Col(2))
);
For Each({fruit}, fruits,
lub << append(Text Box(fruit));
lub << append(Number Edit Box(42));
);
nw = New Window("Enter Numbers", <<MODAL></MODAL>
<P>o memorizzare i riferimenti a un elenco</P>
<P> </P>
<P> </P>
<CODE class=" language-jsl">Names Default To Here(1);
fruits = {"apple", "banana", "orange"};
value_collector = V List Box(
Text Box("Enter the values"),
lub = Lineup Box(N Col(2))
);
nebs = {};
For Each({fruit}, fruits,
lub << append(Text Box(fruit));
lub << append(neb = Number Edit Box(42));
Insert Into(nebs, neb);
);
nw = New Window("Enter Numbers", <<MODAL></MODAL>
<P>o array associativo</P>
<P> </P>
<CODE class=" language-jsl">Names Default To Here(1);
fruits = {"apple", "banana", "orange"};
value_collector = V List Box(
Text Box("Enter the values"),
lub = Lineup Box(N Col(2))
);
vals = Associative Array();
For Each({fruit}, fruits,
lub << append(Text Box(fruit));
lub << append(neb = Number Edit Box(42));
vals[fruit] = neb;
);
nw = New Window("Enter Numbers", <<MODAL></MODAL>
<P>Con questi avrai un'interfaccia utente simile a questa</P>
<P><SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1724770118276.png" style="width: 400px;"><span class="lia-inline-image-display-wrapper" image-alt="jthi_1-1724770118276.png" style="width: 175px;"><img src="https://us.v-cdn.net/6038925/uploads/images/67574i33AD25CCD1BE26A1/jthi_1-1724770118276.png" role="button" title="jthi_1-1724770118276.png" alt="jthi_1-1724770118276.png" /></span></SPAN></P>
<P>Oppure potresti utilizzare elementi della casella di visualizzazione completamente diversi (casella della tabella e casella di modifica della colonna dei numeri)</P>
<CODE class=" language-jsl">Names Default To Here(1);
fruits = {"apple", "banana", "orange"};
nw = New Window("Enter Numbers", <<MODAL></MODAL>
<P><SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1724770072443.png" style="width: 400px;"><span class="lia-inline-image-display-wrapper" image-alt="jthi_0-1724770072443.png" style="width: 159px;"><img src="https://us.v-cdn.net/6038925/uploads/images/67573i6DD519A3AA61CFB2/jthi_0-1724770072443.png" role="button" title="jthi_0-1724770072443.png" alt="jthi_0-1724770072443.png" /></span></SPAN></P>
<P> </P>