[ENH] NewProgressBar
Alexander Lazarevic
Alexander at Lazarevic.de
Thu Apr 8 15:54:26 UTC 2004
That was obviously too easy. With this the refresh rates of all progress
bars depend on the one doing the forced refresh. I will stop here and
leave it as it was, before it gets too messy. 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.
Alex
-----Ursprüngliche Nachricht-----
Von: squeak-dev-bounces at lists.squeakfoundation.org
[mailto:squeak-dev-bounces at lists.squeakfoundation.org] Im Auftrag von
Alexander Lazarevic
Gesendet: Donnerstag, 8. April 2004 17:17
An: 'The general-purpose Squeak developers list'
Betreff: [ENH] NewProgressBar
Hi Stef!
> I have a new version: what about something along this line:
No, that's not working either. I think the following will do the trick:
"..."
forceRefresh _ Processor activeProcess = Project uiProcess.
^[:barVal |
(barVal between: minValue and: maxValue) ifTrue: [
newBarSize _ (barVal - minValue / range * BarWidth)
truncated.
newBarSize = barSize ifFalse: [
barSize _ newBarSize.
(bars at: slot) barSize: barSize; changed.
(forceRefresh and: [Time primMillisecondClock -
lastRefresh > 25]) ifTrue: [
self currentWorld displayWorld.
lastRefresh _ Time
primMillisecondClock]]].
slot]
If nothing breaks I will send out an update during the next days.
Alex
More information about the Squeak-dev
mailing list
|