[squeak-dev] The Trunk: MorphicExtras-ul.100.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Jun 18 08:54:31 UTC 2011


Levente Uzonyi uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-ul.100.mcz

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

Name: MorphicExtras-ul.100
Author: ul
Time: 17 June 2011, 4:39:39.458 pm
UUID: c55f2b18-e58c-b94e-962e-ab6bc2be6c60
Ancestors: MorphicExtras-ul.99

- Use #repeat instead of [ true ] whileTrue and friends.
- Use #displayProgressFrom:to:during: instead of #displayProgressAt:from:to:during:.

=============== Diff against MorphicExtras-ul.99 ===============

Item was changed:
  ----- Method: BookMorph>>morphsForPageSorter (in category 'sorting') -----
  morphsForPageSorter
  	| thumbnails |
  	'Assembling thumbnail images...'
+ 		displayProgressFrom: 0 to: pages size
- 		displayProgressAt: self cursorPoint
- 		from: 0 to: pages size
  		during:
  			[:bar | | i |
  			i := 0.
  			thumbnails := pages collect:
  				[:p | bar value: (i:= i+1).
  				pages size > 40 
  					ifTrue: [p smallThumbnailForPageSorter inBook: self]
  					ifFalse: [p thumbnailForPageSorter inBook: self]]].
  	^ thumbnails!

Item was changed:
  ----- Method: ProjectSorterMorph>>morphsForMyContentsFrom:sizedTo: (in category 'as yet unclassified') -----
  morphsForMyContentsFrom: listOfPages sizedTo: sz
  
  	| morphsForPageSorter |
  
  	'Assembling thumbnail images...'
+ 		displayProgressFrom: 0 to: listOfPages size
- 		displayProgressAt: self cursorPoint
- 		from: 0 to: listOfPages size
  		during: [:bar |
  			morphsForPageSorter := listOfPages withIndexCollect: [ :each :index | 
  				bar value: index.
  				self sorterMorphForProjectNamed: each first
  			].
  		].
  	^morphsForPageSorter
  !

Item was changed:
  ----- Method: SqueakPageCache class>>deleteUnreferencedPages (in category 'housekeeping') -----
  deleteUnreferencedPages
  	"Remove any pages that are not current referred to by any book or URL morph."
  	"Details: Since unreferenced pages could refer to other pages, this process is iterated until no unreferenced pages can be found. It currently does not collect cycles."
  	"SqueakPageCache deleteUnreferencedPages"
  
  	| unreferenced |
+ 	[
- 	[true] whileTrue: [
  		Smalltalk garbageCollect.
  		unreferenced := PageCache keys asSet.
  		URLMorph allSubInstancesDo: [:m | unreferenced remove: m url ifAbsent: []].
  		MorphObjectOut allInstancesDo: [:ticklish |
  			unreferenced remove: ticklish url ifAbsent: []].
  		unreferenced size = 0 ifTrue: [^ self].
+ 		unreferenced do: [:url | PageCache removeKey: url ifAbsent: []]] repeat
- 		unreferenced do: [:url | PageCache removeKey: url ifAbsent: []]].
  !

Item was changed:
  ----- Method: WorldState>>startBackgroundProcess (in category '*MorphicExtras-update cycle') -----
  startBackgroundProcess
  	"Start a process to update this world in the background. Return the process created."
  
  	| p |
+ 	p := [[
- 	p := [[true] whileTrue: [
  		self doOneCycleInBackground.
+ 		(Delay forMilliseconds: 20) wait] repeat] newProcess.
- 		(Delay forMilliseconds: 20) wait]] newProcess.
  	p resume.
  	^ p
  !




More information about the Squeak-dev mailing list