[bug] 1 instVarAt: 1 put: 1.

Andreas Raab andreas.raab at gmx.de
Wed Aug 13 22:16:17 UTC 2003


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"

which yields

	Integer instSize => 0
	SmallInteger instSize => 0

etc. So in short, you shouldn't even attempt to do this unless you know that
the object actually _has_ instance variables.

Cheers,
  - Andreas


> -----Original Message-----
> From: squeak-dev-bounces at lists.squeakfoundation.org 
> [mailto:squeak-dev-bounces at lists.squeakfoundation.org] On 
> Behalf Of Michael van der Gulik
> Sent: Thursday, August 14, 2003 12:05 AM
> To: squeak-dev at lists.squeakfoundation.org
> Subject: [bug] 1 instVarAt: 1 put: 1.
> 
> 
> Try:
> 	1 instVarAt: 1 put: 1.
> 
> Dumps core on my machine (Linux; debian unstable. Squeak 3.5 #5180).
> 
> The reason I'm doing that is because I'm adding a general persistence 
> mechanism to 'Object class' which iterates over each object's 
> instance 
> variables (people are sure to ask why I'm doing that :-) ).
> 
> Michael.
> 
> 
> 



More information about the Squeak-dev mailing list