Hi
I would like to get your point of view on the following:
In Object there is the method
updateThresholdForGraphicInViewerTab
"When a Viewer is open on the receiver, its tab needs some graphic to
show to the user. Computing this graphic can take quite some time so
we want to make the update frequency depending on how long it takes to
compute the thumbnail. The threshold returned by this method defines
that the viewer will update at most every 'threshold *
timeItTakesToDraw' milliseconds. Thus, if the time for computing the
receiver's thumbnail is 200 msecs and the the threshold is 10, the
viewer will update at most every two seconds."
^20 "seems to be a pretty good general choice"
which is only defined on Object.
and only called by
ThumbnailMorph>>stepTime
"Adjust my step time to the time it takes drawing my referent"
drawTime ifNil:[^ 250].
^(objectToView updateThresholdForGraphicInViewerTab * drawTime) max:
250.
and I was thinking ok this a nice hook and may be it should be a
morphic extension on
Object. On the other hand it seems that this is a feature that is only
use by one class
that is not even core. So may be we could put the magic number inside
the step time.
Stef
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project