1 instVarAt: 1 put: 1.

Michael van der Gulik mikevdg at hetnet.nl
Thu Aug 14 09:13:25 UTC 2003


Object>>stateOn: aStream
	| i |
	i := 1.
	[true] whileTrue: [
		[ aStream nextRefererence: (self instVarAt: i). i:=i+1.]
			ifError: [ aStream close. ^self. ].
	].

:-P. Open source is great! I can't be fired for code like this! :-).

Michael.

Andreas Raab wrote:
> Hi,
> 
> While we can consider this a bug, it is certainly the case that you should
> ask an object about its instSize before attempting this. E.g.,
> 
> 	Object instSize => 0 "no instVars"
> 	Point instSize => 2 "two instVars"




More information about the Squeak-dev mailing list