local test_callback_progress;
function test_callback(t,n)
if(n==1) then
test_callback_progress = gma.gui.progress.start("test");
gma.gui.progress.setrange(test_callback_progress,1,10);
gma.gui.progress.set(test_callback_progress,n);
elseif(n==10) then
gma.gui.progress.stop(test_callback_progress);
else
gma.gui.progress.set(test_callback_progress,n);
end
gma.echo("count " .. n);
end
function Start()
if(gma.gui.confirm("Please Confirm","Should I register the timer ?")) then
gma.timer(test_callback,1,10,Cleanup);
end
end
function Cleanup()
gma.echo("Cleanup called");
gma.gui.progress.stop(test_callback_progress);
end
return Start,Cleanup;