Code: Select all
on closeStack
if field "textEditor" is not "" or the number of cards of this stack > 1 then
answer "Would you like to save your work?" with "No" or "Yes"
if it is "Yes" then
saveDocs
else
put the number of cards of this stack into tmpNum
repeat with x=tmpNum down to 0
close card tmpNum
if the number of this card is "1" then put "" into field "textEditor"; put "" into field "saved"; put "" into field "filePath"
end repeat
end if
end if
pass closeStack
end closeStack
I thought unless you coded an exit to a repeat, that wouldn't/couldn't happen?
At first, i thought it was because of a 'preOpenCard' handler I was testing, but I commented that out and it still happens. Any thoughts?