errore "Impossibile ottenere il pulsante restituito da \" C \ "." numero -1728 dal pulsante restituito da "C"

-1
set buttonChoice to (display dialog "Play game?" buttons {"Yes", "No"} with title "Play?")
if button returned of buttonChoice = "No" then
return "No"
end if
repeat
 set levelnum to text returned of (display dialog "How many levels will you play?" buttons {"Ok"} default answer "1" with title "Levels?")
set Letters_ to {"A", "B", "C", "D", "E", "F", "G"}
set buttonChoice2 to (choose from list Letters_ with prompt "Choose A Letter" with title "Pick One" without multiple selections allowed) as text
if button returned of buttonChoice2 = "C" then
    display dialog "You Win!" buttons {"Yay!, Proceed to next level"}
    exit repeat
else
    display dialog "Try again :("
end if
end repeat

Posso correggere l'errore "Impossibile restituire il pulsante di \" C \ "." numero -1728 dal pulsante               restituito di "C"

    
posta MindCrap Capper 14.09.2014 - 17:43
fonte

1 risposta

0

buttonChoice2 già contiene la lettera selezionata, quindi

set buttonChoice2 to (choose from list Letters_ with prompt "Choose A Letter" with title "Pick One" without multiple selections allowed) as text
if buttonChoice2 = "C" then
    display dialog "You Win!" buttons {"Yay!, Proceed to next level"}
    exit repeat
else
    display dialog "Try again :("
end if
    
risposta data 14.09.2014 - 17:47
fonte

Leggi altre domande sui tag