[stringtemplate-interest] Multi-column output

Terence Parr parrt at cs.usfca.edu
Tue May 24 16:36:36 PDT 2005


On May 18, 2005, at 7:12 AM, <ilia at obnovlenie.ru>  
<ilia at obnovlenie.ru> wrote:

>
> I want a simple thing: to output my Picture[] pictures list as a
> multi-column table.
> Column number and width are managed solely by designer,
> Total count of pictures is known beforehand surely.
>
> E.g 12 pictures may be output as 2x6 table or 3x4 table or 4x3  
> table.. Or 12
> in a single column.
> Designer is the only one who knows.

i think I would agree with this.

> How this thing is done with StringTemplate ?

Currently this cannot be done purely within ST. You'd have to pass in  
different size chunks of the data. :(

Booo....

i'm just nervous about access the ith attribute...starts to look very  
code-like, though in this particular case it's pretty hard to argue  
that the decision should be anywhere but with the designer.  Hmm...

Ter
--
CS Professor & Grad Director, University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Cofounder, http://www.jguru.com



More information about the stringtemplate-interest mailing list