Startseite › Foren › Deutsches LiveCode-Forum › array füllen › Antwort auf: array füllen
März 13, 2020 um 23:23 Uhr
#19587
Oje, da war ich wieder etwas zu schnell und habe nur die Keys gecheckt. Mache schnell eine neue Version, Sekunde…
Ah, es geht noch eleganter 🙂
Um das Funktonieren zu sehen, muss man einen neuen Stack mit einem Button und einem Tree-Widget erstellen. Un den Button filgendes Skript einfügen:
on mouseUp
createArrayFromList "a","b","3","4"
put the result into tArray
set the arrayData of widget "Tree" to tArray
end mouseUp
command createArrayFromList
repeat with tParam = 1 to the paramCount
put param(tParam) into tArray[tParam]
end repeat
return tArray
end createArrayFromList
