Startseite › Foren › Deutsches LiveCode-Forum › array füllen › Antwort auf: array füllen
März 13, 2020 um 23:41 Uhr
#19588
Und man kann es auch als Funktion bauen:
on mouseUp
put CreateArrayFromList("Hallo welt","b","3","4",6,7,8,9,0) into tArray
set the arrayData of widget "Tree" to tArray
end mouseUp
function CreateArrayFromList
repeat with tParam = 1 to the paramCount
put param(tParam) into tArray[tParam]
end repeat
return tArray
end CreateArrayFromList
Oder ganz spartanisch:
set the arrayData of widget "Tree" to CreateArrayFromList("Moin!","b","3","4",6,7,8,9,0)
Ach, Livecode ist einfach herrlich 🙂