Three things wrong with "ask"
Posted: Tue Apr 07, 2009 2:15 pm
Hallo, there's three things wrong with some code I'm using; I'm sure there something obvious here that I've missed perhaps. The code is:
• The first thing is the word "false" appears in the field; always a sign there's something wrong
• The second thing is that if I press cancel, it deletes the name of the button
• The third thing is if the control key is down, it still beeps.
Apart from that, this simple bit of code is alright!
Any help appreciated, thanks.
Code: Select all
on mouseDown
if the controlKey is not down then
beep
end if
if the controlKey is down then
ask "Change button title" with "Cancel" and "Change"
set the name of me to it
else
exit mouseDown
end if
end mouseDown
• The second thing is that if I press cancel, it deletes the name of the button
• The third thing is if the control key is down, it still beeps.
Apart from that, this simple bit of code is alright!

Any help appreciated, thanks.