kpj •->

Anmeldedatum: 15.05.2010 Beiträge: 2
|
Verfasst am: 15.05.2010 - 19:28 Titel: Unbestimmte Anzahl von Strings erstellen |
|
|
Hallo erstmal,
Also, ich habe einen Dialog (das Teil mit display dialog), in das man eine
Texteingabe machen kann. Diese Eingabe wird in einer Liste gespeichert. Danach klickt man auf Ok, und kann dann wieder auswählen, ob man noch einmal auf die gleiche Frage antworten will, oder lieber zur nächsten Frage voranschreiten will. Je nach dem, wie oft man etwas eingeben will, verändert sich die Länge der Liste, da jede Antwort eingespeichert wird.
Dieser verschiedenen Antworten will ich nun in einzelne Strings verpacken.
Zur Veranschaulichung hier der Codeschnipsel
Code: | display dialog "Do you want to add some voting options?" buttons {"Yes", "No"} default button 2
if the button returned of the result is "Yes" then
set finished to false
set mapsTOvote to {}
repeat while finished is false
display dialog "Do you want to add a map to vote?" buttons {"Yes", "No"} default button 1
if the button returned of the result is "Yes" then
set mapVOTED to display dialog "Which map do you want to make selectable (Again, without .map)?" default answer "map" buttons {"OK"} default button 1
set mapsTOvote to mapsTOvote & text returned of mapVOTED & " "
else
set finished to true
end if
end repeat
else
end if |
Ist mein Ansatz komplett falsch, muss ich vielleicht ganz anders anfangen?
Danke schonmal für eure Lösungsvorschläge
kpj |
|