Object subclass: #ContextStory instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'SmalltalkLecture-Story'! "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "! ContextStory class instanceVariableNames: ''! !ContextStory class methodsFor: 'utilities'! write "ContextStory write." ^self write: 10! write: howMany "ContextStory write: 10." ^self write: 10 on: Transcript! write: howMany on: aStream "ContextStory write: 10 on: Transcript." | aContext aCollection | aContext := thisContext sender. [aContext notNil and: [aContext receiver = self]] whileTrue: [aContext := aContext sender]. aCollection := OrderedCollection new: howMany. howMany timesRepeat: [aContext notNil ifTrue: [aCollection addFirst: aContext. aContext := aContext sender]]. aStream cr. aCollection with: (0 to: aCollection size - 1) do: [:context :level | aStream cr. level timesRepeat: [aStream nextPutAll: ' | ']. aStream nextPutAll: context printString. aStream flush]. ^aCollection! !