[squeak-dev] [Q] we have some like old typewriter tabs ?

Marcel Taeumel marcel.taeumel at hpi.de
Sun May 27 10:14:20 UTC 2018


Hi Edgar,

Squeak's text printing facilities do not support "stored tabs". You can use #padded:to:with: to fill up contents with spaces or other characters:

'foobar' padded: #right to: 25 with: $.
'12' padded: #left to: 3 with: Character space.

Then use a monospaced font (e.g. via "TextStyle defaultFixedFont"), too. :-)

Best,
Marcel
Am 26.05.2018 23:07:17 schrieb Edgar De Cleene <edgardec2005 at gmail.com>:
Very thanks, looking it 

On Sat, 26 May 2018 at 16:53 Chris Muller <asqueaker at gmail.com [mailto:asqueaker at gmail.com]> wrote:

Hi Edgar,

I made a flexible utility for printing collections of objects to a
stream in a Fixed-Width columnar format.  They don't use tabs, but
spaces, so they always work when viewed in a fixed-width font.

It is available in the "MaBase" package on SqueakMap.  To use, create
an instance of MaFixedWidthReport, then use its 'building' methods to
define the report, then send:

    myFixedWidthReport write: aCollection to: aStream

Browse references to the class for an example.

 - Chris

On Sat, May 26, 2018 at 6:45 AM, Edgar J. De Cleene
<edgardec2005 at gmail.com [mailto:edgardec2005 at gmail.com]> wrote:
> I have this awful output
>
> module        97    61
> type        5    05
> func        4    04
> table        5    05
> global        6    06
> export        15    0f
> elem        8    08
> code        33    21
>
> Like having it nice with some kind of "stored tabs" like each column alings
> right.
>
> Some knows how could made.
> Maybe I have in Squeak but don't know.
>
>
> Edgar
> @morplenauta
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20180527/fd796622/attachment.html>


More information about the Squeak-dev mailing list