[squeak-dev] The Inbox: Collections-pre.839.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Jul 3 13:18:19 UTC 2019


Patrick Rein uploaded a new version of Collections to project The Inbox:
http://source.squeak.org/inbox/Collections-pre.839.mcz

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

Name: Collections-pre.839
Author: pre
Time: 3 July 2019, 3:18:13.925316 pm
UUID: afffb22a-b6b8-1e48-956b-7749ca04237c
Ancestors: Collections-pre.837

Adds ordered printing to OrderedDictionaries, to allow users to actually see the ordering.

=============== Diff against Collections-pre.837 ===============

Item was added:
+ ----- Method: OrderedDictionary>>printElementsOn: (in category 'printing') -----
+ printElementsOn: aStream 
+ 	"Based on Dictionary>>#printElementsOn:"
+ 	
+ 	aStream nextPut: $(.
+ 	self size > 100
+ 		ifTrue: [
+ 			aStream nextPutAll: 'size '.
+ 			self size printOn: aStream]
+ 		ifFalse: [order withIndexDo: [:assoc :index | assoc ifNotNil: [
+ 					index > 1 ifTrue: [aStream space].
+ 					assoc printOn: aStream]]].
+ 	aStream nextPut: $)!



More information about the Squeak-dev mailing list