The Inbox: Collections-pre.839.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: Collections-pre.839.mcz

commits-2
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: $)!