[squeak-dev] The Inbox: 60Deprecated-ct.44.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Aug 15 19:31:15 UTC 2019


A new version of 60Deprecated was added to project The Inbox:
http://source.squeak.org/inbox/60Deprecated-ct.44.mcz

==================== Summary ====================

Name: 60Deprecated-ct.44
Author: ct
Time: 15 August 2019, 9:31:14.537735 pm
UUID: b505e477-f684-124c-892f-372a1246273a
Ancestors: 60Deprecated-ct.43

Deprecate a message from Etoys

=============== Diff against 60Deprecated-ct.43 ===============

Item was added:
+ ----- Method: SystemProgressMorph>>label:min:max: (in category '*60Deprecated') -----
+ label: shortDescription min: minValue max: maxValue
+ 	| slot range newBarSize barSize lastRefresh index |
+ 	self deprecated: 'Use ', #position:label:min:max:, ' with Display center'.
+ 	((range := maxValue - minValue) <= 0 or: [(slot := self nextSlotFor: shortDescription) = 0])
+ 		ifTrue: [^[:barVal| 0 ]].
+ 	self openInWorld.
+ 	activeSlots <= 1
+ 		ifTrue: [self align: self fullBounds center with: Display boundingBox center].
+ 	barSize := -1. "Enforces a inital draw of the morph"
+ 	lastRefresh := 0.
+ 	index := Preferences unifyNestedProgressBars ifFalse: [slot] ifTrue: [1].
+ 	^[:barVal | 
+ 		(barVal between: minValue and: maxValue) ifTrue: [
+ 			newBarSize := (barVal - minValue / range * BarWidth) truncated.
+ 			newBarSize > barSize ifTrue: [
+ 				barSize := newBarSize.
+ 				(bars at: index) barSize: barSize.
+ 				Time primMillisecondClock - lastRefresh > 25 ifTrue: [
+ 					self currentWorld displayWorld.
+ 					lastRefresh := Time primMillisecondClock]]].
+ 		slot]
+ !



More information about the Squeak-dev mailing list