AW: [ENH] NewProgressBar

Alexander Lazarevic Alexander at Lazarevic.de
Thu Apr 8 20:29:46 UTC 2004


Hi Stefane!

I used the example in the new ProgressMorph to test how the stacks
(slots) get allocated, freed and reused in a non-linear order. A big
mistake was to leave this code in the changeset as a showcase for how
the stacking looks like. As I said before the ProgressMorph is not meant
to be used that way and I will remove this example in another update of
the changeset.

This is the well known example of the recommended way to use it (as it
was before)

'I''m busy'
	displayProgressAt: Sensor cursorPoint
	from: 1 to: 100
	during: [:bar |
		1 to: 100 do: [:x| bar value: x. (Delay forMilliseconds:
100) wait]]

The new ProgressMorph is streamlined for the purpose of displaying
progress when the system is busy. It is not meant to be used as a
building block in other morphs. In that aspect it is different from
others morphs and I will note that in the class comment.

Now with the bug you have found I only can guess that you are talking
about a situation where a process gets suspended like in the following
example:

| p |
p := ['Now here''s some Real Progress'
	displayProgressAt: Sensor cursorPoint
	from: 1 to: 100
	during: [:bar |
	1 to: 100 do: [:x | bar value: x.
			(Delay forMilliseconds: 100) wait]]] fork.
(Delay forSeconds: 2) wait.
p suspend.

That the ProgressMorph is still visible after this is no surprise. If
you terminate the process the progressbar will dissapear. So this is no
bug and has nothing to do with an unique instance of ProgressMorph.

So please refrain from the idea of forking processes that contain
progress updates like above.

Alex

-----Ursprüngliche Nachricht-----
Von: squeak-dev-bounces at lists.squeakfoundation.org
[mailto:squeak-dev-bounces at lists.squeakfoundation.org] Im Auftrag von
Stéphane Rollandin
Gesendet: Donnerstag, 8. April 2004 19:56
An: The general-purpose Squeak developers list
Betreff: Re: [ENH] NewProgressBar


  I think the new
> ProgressMorph is good for what it should do and that is replacing the 
> old MVC style progress display with a morphic one. Nothing more, 
> nothing less.
> 

well sure it is nice already, but I can't help thinking it's not yet
quite a "morphic" progress display yet, since it does not behave as a
Morph when you move it around.


I have yet another bug to signal before I stop bother you :)

here it is: if the process being represented by the progress morph gets
interrupted, the corresponding bar stays there forever since there is a
unique instance of the morph.


regards,

Stef









More information about the Squeak-dev mailing list