[squeak-dev] A possible fix for character printing

Levente Uzonyi leves at elte.hu
Tue Nov 23 13:16:29 UTC 2010


I uploaded two packages to the Inbox which are intended to fix the 
problems with array printing and storing. Currently [#($ ) storeString]
evalates to '#(Character space )', which is not valid smalltalk code. The 
cause of the problem is (as discussed here earlier) that Characters 
return true for #isLiteral, but not all characters are printed/stored as 

This solution defines a new method #shouldBePrintedAsLiteral which returns 
true only for those Characters which are printed/stored as literals.

Evaluate the following to test it in your updated Trunk image:

Installer squeak
 	project: 'inbox';
 	install: 'Kernel-ul.518';
 	install: 'Collections-ul.411'.

This solution doesn't fix all compiler issues, since some objects have 
more than one representation: #($ ), { Character space }, { $  }, etc.

Another possible solution would be to print/store all characters in 
literal format (as it was done earlier), but some of the printed objects 
are not readable (by humans) in that case.


More information about the Squeak-dev mailing list