Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Object method printOn:
Last updated at 11:45 am UTC on 30 April 2019

Object

printOn: aStream
	"Append to the argument, aStream, a sequence of characters that  
	identifies the receiver."

	| title |
	title := self class name.
	aStream
		nextPutAll: (title first isVowel ifTrue: ['an '] ifFalse: ['a ']);
		nextPutAll: title



TODO: Show SRE variant
SRE Execution Tracer
http://heim.ifi.uio.no/~trygver/themes/SRE/SRE-index.html


Array

printOn: aStream
	self class == Array ifFalse:
		[^super printOn: aStream].
	self shouldBePrintedAsLiteral
		ifTrue: [self printAsLiteralOn: aStream]
		ifFalse: [self printAsBraceFormOn: aStream]


Color

printOn: aStream
	| name |
	(name := self name) ifNotNil:
		[^ aStream
			nextPutAll: 'Color ';
			nextPutAll: name].
	self storeOn: aStream.



Rectangle

printOn: aStream 
	"Refer to the comment in Object|printOn:."

	origin printOn: aStream.
	aStream nextPutAll: ' corner: '.
	corner printOn: aStream


Complete view of an object

To have a complete view of an object use the SRE Object Browser.