pretty printing ala Goldberg
Bert Freudenberg
bert at isg.cs.uni-magdeburg.de
Mon Apr 8 13:05:44 UTC 2002
On Sun, 7 Apr 2002, Ned Konz wrote:
> or you could try to use Unicode characters (and hope that the browsers support
> them):
>
> HtmlFileStream
>
> nextPut: char
> "Put a character on the file, but translate it first. 4/6/96 tk 1/1/98 acg"
> char = $< ifTrue: [^ super nextPutAll: '<'].
> char = $> ifTrue: [^ super nextPutAll: '>'].
> char = $& ifTrue: [^ super nextPutAll: '&'].
> char = $^ ifTrue: [ ^ super nextPutAll: '↑' ].
> char = $_ ifTrue: [ ^ super nextPutAll: '←' ].
> char asciiValue = 13 "return"
> ifTrue: [self command: 'br'].
> char = $ "tab"
> ifTrue: [self verbatim: TabThing. ^super nextPut: char].
> ^ super nextPut: char
Nice idea. Though the arrows are too large for my taste. And they won't
print (at least in my setup - only Mozilla shows them, but they don't
show up in print).
-- Bert
More information about the Squeak-dev
mailing list
|