local fromTheBeginning, exitHandler
on oneMoreLine
-- this handler is for the "Next Line" button
if fromTheBeginning = true
then
-- start handler:
oneLineAtTheTime
else
set the cCustomProp of me to true
end if
end oneMoreLine
on oneLineAtTheTime
set the cCustomProp of me to false
put false into exitHandler
put false into fromTheBeginning
repeat with i = 1 to the number of lines in field "myField"
select line i of field "myField"
wait until the cCustomProp of me is true with messages
if exitHandler is true then exit to top
set the cCustomProp of me to false
end repeat
put true into fromTheBeginning
end oneLineAtTheTime
on exitHandlerOneLineAtTheTime
-- this handler is for the "Exit Loop" button
put true into exitHandler
set the cCustomProp of me to true
put true into fromTheBeginning
end exitHandlerOneLineAtTheTime
on closeStack
exitHandlerOneLineAtTheTime
end closeStack
on mouseUp
global i
if i is empty then put 1 into i
select line i of field "myField"
if i = the number of lines in field "myField" then put 1 into i
add one to i
end mouseUp
no, the whole point was to use "wait until" in one handler and restart it from another handler. This was just to test it, I skipped all the other stuff and reasons for doing it.
Maybe a bit confusing that i made both handlers start from one button handler.
I should not have put a subject on the last message, because it was supposed to hang on to my other posted subject "Restarting a handler by a message"
ToreT wrote:no, the whole point was to use "wait until" in one handler and restart it from another handler. This was just to test it, I skipped all the other stuff and reasons for doing it."