#collect:displayingProgress:

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

#collect:displayingProgress:

Sven Van Caekenberghe
Hello,

Is this a bug or am I looking at this the wrong way ?

This usage of #collect:displayingProgress: works as expected:

#(a b c d e f g)
        collect: [:each | (Delay forMilliseconds: 100) wait. each ]
        displayingProgress: 'Working'

While this doesn't:

#(a b c d e f g)
        collect: [:each | (Delay forMilliseconds: 100) wait. each ]
        displayingProgress: [:each | 'Collecting ', each asString]

The similar #do:displayingProgress: does work.
It seems the index is passed into the progress block, not the element.
Maybe this is by design ?

Sven



_______________________________________________
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
|

Issue 2984 #collect:displayingProgress: vs #do:displayingProgress: (New Inspector)

Sven Van Caekenberghe
Turned into http://code.google.com/p/pharo/issues/detail?id=2984

On 06 Sep 2010, at 12:07, Sven Van Caekenberghe wrote:

> Hello,
>
> Is this a bug or am I looking at this the wrong way ?
>
> This usage of #collect:displayingProgress: works as expected:
>
> #(a b c d e f g)
> collect: [:each | (Delay forMilliseconds: 100) wait. each ]
> displayingProgress: 'Working'
>
> While this doesn't:
>
> #(a b c d e f g)
> collect: [:each | (Delay forMilliseconds: 100) wait. each ]
> displayingProgress: [:each | 'Collecting ', each asString]
>
> The similar #do:displayingProgress: does work.
> It seems the index is passed into the progress block, not the element.
> Maybe this is by design ?
>
> Sven
>
>
>
> _______________________________________________
> 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: Issue 2984 #collect:displayingProgress: vs #do:displayingProgress: (New Inspector)

Stéphane Ducasse
Thanks this is an important reflex because of the volume and variety of issue.
>
> Turned into http://code.google.com/p/pharo/issues/detail?id=2984
>


_______________________________________________
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: Issue 2984 #collect:displayingProgress: vs #do:displayingProgress: (New Inspector)

Frederic Pluquet-3
There is fixed in the last version of NewInspector.

Fréd
----
Frédéric Pluquet
Université Libre de Bruxelles (ULB)
Assistant
http://www.ulb.ac.be/di/fpluquet


On Mon, Sep 20, 2010 at 8:24 PM, Stéphane Ducasse <[hidden email]> wrote:
Thanks this is an important reflex because of the volume and variety of issue.
_______________________________________________
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