[ENH] NewProgressBar

Alexander Lazarevic Alexander at Lazarevic.de
Thu Apr 8 15:17:13 UTC 2004


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