[ENH] DefaultProgressBar

Yoshiki Ohshima Yoshiki.Ohshima at acm.org
Tue Apr 6 19:24:46 UTC 2004


  Alex,

> This update should speed things up considerably. I think there is room
> for more, but even than it is hard to beat the MVC progress display by
> speed. That's why I added a preference to switch between morphic and mvc
> style progress display.

  If we avoid the Fraction arithmetic, it seems that we can get it
twice as fast.

defaultMorphicAction
	| result progress |
	progress _ ProgressMorph label: progressTitle.
	progress openInWorld.
	[result _ workBlock value: [:barVal | progress done: (barVal - minVal) asFloat / (maxVal - minVal) asFloat]] 		ensure: [progress delete].
	self resume: result

  I guess you can 'cache' ProgressMorph here so that it doesn't get
created every time.  (right?)

-- Yoshiki



More information about the Squeak-dev mailing list