[squeak-dev] The Inbox: Morphic-mt.1664.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Jun 5 09:50:03 UTC 2020


A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-mt.1664.mcz

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

Name: Morphic-mt.1664
Author: mt
Time: 5 June 2020, 11:49:58.884634 am
UUID: 8a563509-bb80-b34a-a723-9bcc1a586f10
Ancestors: Morphic-mt.1663

Proposal of different format to print integers in the object explorer. Print them in groups of, e.g., 4 digits, separated by a space character.

I am sure that the actual implementation can be improved. :-)

=============== Diff against Morphic-mt.1663 ===============

Item was changed:
  ----- Method: Integer>>explorerContents (in category '*Morphic-Explorer') -----
  explorerContents
  
  	^#(
+ 		('hexadecimal' 16 4)
+ 		('octal' 8 4)
+ 		('binary' 2 4)) collect: [ :each | | label group |
+ 			group := each third.
+ 			label := self printStringBase: each second.
+ 			label := label padded: #left to: (label size roundUpTo: group) with: $0.
+ 				label := String streamContents: [:s |
+ 				1 to: label size by: group do: [:index |
+ 					1 to: group do: [:gIndex |
+ 						s nextPut: (label at: index + gIndex - 1)].
+ 					s space]].
+ 			 
- 		('hexadecimal' 16)
- 		('octal' 8)
- 		('binary' 2)) collect: [ :each |
  			ObjectExplorerWrapper
+ 				with: label
- 				with: (self printStringBase: each second)
  				name: each first translated
  				model: self ]!



More information about the Squeak-dev mailing list