I was tidying up my UI for a phone/tablet app by removing a button that changed if the user selected a line in a list field.
Worked perfectly on the desktop.
here is the code form the list field script
Code: Select all
local svalue
on MouseUp
add 1 to svalue
if svalue > 1 then
ClearTally -- If they doubleclick then it clears the whole list field
put 0 into svalue
exit mouseup
end if --- <<---- Line 12
send "toolate" to me in 0.4 seconds
end MouseUp
on Toolate
if svalue = 1 then
DeleteItem -- if they click on a line ask them if they want to delete the selected item
end if
put 0 into svalue
end Toolate
on DeleteItem
local lnClicked, lcLabel, lnTotal, lnDiner, lcButton
beep
if GetYesno("DELETE the Selected Item?") is false then
exit DeleteItem
end if
-- delete code here
end DeleteItem
Line 12 is the endif and error 624 is "wait aborted"
Simple question why does it work differently?
I increased the 0.4 seconds send "toolate" to 1 second and what it does execute the deletitem command but still brings up the error.
If I press ok to the error and answer yes or NO it it does nothing, but then EVERY other time it calls the clear tally (obviously svalue is never reset to zero).
Any ideas, suggestions gratefully accepted ?
Thanks
Lagi