Progress box on save

Mark Schonewille m.schonewille at economy-x-talk.com
Tue Feb 20 09:09:40 EST 2007


Hi Bill,

Just create another window with a progress bar. While you run your  
script, set the thumbPos of scrollbar 1 of this new stack to a  
particular number. Close the window when the script is done. In your  
repeat loop, you need to send messages to the progress bar to have it  
set the thumbPos to the correct value and you need to wait with messges.

on foo
   go stack "Your Progress Window" as modeless -- show stack in new  
window
   go back
   repeat with x = 1 to 100
     -- do your stuff here
     send "setThumbPos x" to stack "Your Progress Window"
     wait 0 millisecs with messages -- give Rev time to update screen
   end repeat
   close window "Your Progress Window"
end foo

In the stack "Your Progress Window" you would have the following  
handler:

on setThumbPos x
   set the thumbPos of scrollbar 1 to x
end setThumbPos

Before you run these scripts, set the startValue of scrollbar 1 to 0  
and the endValue to 100.

Best,

Mark

--

Economy-x-Talk
Consultancy and Software Engineering
http://economy-x-talk.com
http://www.salery.biz

Get your store on-line within minutes with Salery Web Store software.  
Download at http://www.salery.biz

Op 20-feb-2007, om 6:57 heeft Bill Vlahos het volgende geschreven:

> I have a stack which sometimes takes a long time to save so I'd  
> like to put up a message with a progress bar (or even a static one  
> is OK) while I save it so the user knows that something is  
> happening and it just isn't finished yet.
>
> Ask and Answer won't work because they require the user to do  
> something to get them started. I might want to allow the user to  
> cancel the save but probably not even that.
>
> Rev does something like what I want when it saves a stack except  
> there is no progress bar but it isn't obvious to me how they do it.
>
> Bill Vlahos
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the Use-livecode mailing list