Submitting a fix.

bryce at kampjes.demon.co.uk bryce at kampjes.demon.co.uk
Tue Aug 7 20:11:13 UTC 2007


Lukas Renggli writes:
 > > The bug matters to me because I print arrays into error
 > > logs then want to evaluate them back into Squeak to
 > > replay the logs to reproduce bugs.
 > 
 > Shouldn't you use #storeString instead of #printString for that matter?

printString does what I want for Arrays with all elements except
metaclasses including classes. It's a log file, it's got two uses, one
is to read to see what happened the other is to replay to reproduce
bugs.

   {Array . 42} storeString '((Array new: 2) at: 1 put: Array; at: 2 put: 42; yourself)'
   {Array . 42} printString '{Array . 42}'

I quickly tried using storeString and it's not very readable for 
small examples, for the longer ones with 5-10 arrays containing
an integer (bytecode address) and a class (the receiving class)
it would be hopeless.

Bryce

P.S. I just used printString because it worked, I only tried
storeString after reading your email.



More information about the Squeak-dev mailing list