05-10-2016, 02:02 PM
You are forgetting about inter application messaging in yab.
Change the main loop:
have your application send the_Scripting:done message:
arived = message send "application/x-vnd.barberpole", "done"
Change the main loop:
Code:
while(not leavingLoop)
nCommands = token(message$, msg$(), "|")
for everyCommand = 1 to nCommands
if(DEBUG and msg$(everyCommand)<>"") print msg$(everyCommand)
switch(msg$(everyCommand))
case "_QuitRequested"
case "_Scripting:done"
leavingLoop = true
break
default:
break
end switch
next everyCommand
spin("Barber")
wend
have your application send the_Scripting:done message:
arived = message send "application/x-vnd.barberpole", "done"