Progress bars

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Progress bars

Schwab,Wilhelm K
Hello all,

Is there a preferred way to produce a progress bar?  The example below seems to work, but is there a better way?  Is there a way to provide a cancel button?

Bill



[
        #( 1 2 3 4 5 )
                do:[ :each |
                        ( Delay forMilliseconds:500 ) wait.
                ]
                displayingProgress:'Gratuitous Progress Bar.'
] fork.



_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Progress bars

Stéphane Ducasse
Check

SystemProgressMorph example


        'Progress' displayProgressAt: Display center
                from: 0
                to: 1000
                during: [:bar | 0 to: 1000 do: [:i | bar value: i. (Delay  
forMilliseconds: 2) wait]]


Stef
On Sep 18, 2009, at 7:33 PM, Schwab,Wilhelm K wrote:

> Hello all,
>
> Is there a preferred way to produce a progress bar?  The example  
> below seems to work, but is there a better way?  Is there a way to  
> provide a cancel button?
>
> Bill
>
>
>
> [
> #( 1 2 3 4 5 )
> do:[ :each |
> ( Delay forMilliseconds:500 ) wait.
> ]
> displayingProgress:'Gratuitous Progress Bar.'
> ] fork.
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Progress bars

Schwab,Wilhelm K
Stef,

Thanks for the reply.  That worked nicely, and beyond that, so did LDAPlayer.  I had a list of roughly 1200 people to look up in a directory, and Pharo stood up to it nicely.  If only the entries were of like quality, but that's another problem (one that we are trying to address).  BTW, there were far more than 1200 searches because (did I mention the entries are junk?<g>) I added logic to retry w/o the given name under some circumstances.  Some searches exceeded limits that the directory found tolerable (I guess it did not like keeping up with the Jones' - US slag based pun alert).

It would still be nice to have a progess dialog with a cancel button, but I am very pleased to see Pharo stand up to the network traffic and the debugging.  If we're not careful, we will end up with a clean, robust, open source Smalltalk :)  Thanks to all for the great progress to date!

Bill



-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Stéphane Ducasse
Sent: Friday, September 18, 2009 12:51 PM
To: [hidden email]
Subject: Re: [Pharo-project] Progress bars

Check

SystemProgressMorph example


        'Progress' displayProgressAt: Display center
                from: 0
                to: 1000
                during: [:bar | 0 to: 1000 do: [:i | bar value: i. (Delay
forMilliseconds: 2) wait]]


Stef
On Sep 18, 2009, at 7:33 PM, Schwab,Wilhelm K wrote:

> Hello all,
>
> Is there a preferred way to produce a progress bar?  The example below
> seems to work, but is there a better way?  Is there a way to provide a
> cancel button?
>
> Bill
>
>
>
> [
> #( 1 2 3 4 5 )
> do:[ :each |
> ( Delay forMilliseconds:500 ) wait.
> ]
> displayingProgress:'Gratuitous Progress Bar.'
> ] fork.
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project