[Pharo-users] What's wrong whith this code?

Nicolai Hess nicolaihess at web.de
Wed Mar 19 04:56:15 EDT 2014


2014-03-19 8:17 GMT+01:00 Friedrich Dominicus <frido at q-software-solutions.de
>:

> Bernat Romagosa <tibabenfortlapalanca at gmail.com> writes:
>
> > ouch, I added a . in the middle, sorry!
> >
> > elements := #('eins' 'zwei' 'drei' 'vier').
> > elements
> > do: [ :element | (Delay forSeconds: 2) wait ]
> > displayingProgress: [ :element | 'Working on', element asString ].
> >
> > 2014-03-18 9:55 GMT+01:00 Bernat Romagosa
> > <tibabenfortlapalanca at gmail.com>:
> >
> >     Without having tried it, I think you're missing a #wait message in
> >     there:
> >
> >
> >
> >     elements := #('eins' 'zwei' 'drei' 'vier').
> >     elements do: [ :element | (Delay forSeconds: 2) wait ].
> >
> >     displayingProgress: [ :element | 'Working on', element asString ].
> Sorry even with that I do not see the 'Working on ' message.
> It's just a progress bar with nothing else. No "Working on" anywhere.
>
> Regards
> Friedrich
>
>

It doesn't work anymore. (This worked in Pharo 1.4)
In the comment of Collection>>do:displayingProgress:
is a example, that doesn't work:
Smalltalk allClasses
            do:[:aClass| (Delay forMilliseconds: 1) wait]
            displayingProgress:[:aClass| 'Processing ', aClass name].

This should show the class names but it shows
only a single progressbar.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20140319/28e96ce4/attachment.html>


More information about the Pharo-users mailing list