[stringtemplate-interest] Wrapping and expression for fixed right edge

Scott Waye scott.waye at hubse.com
Mon Nov 16 12:36:11 PST 2009


Hi,

First post so I may be on the wrong track.  I want to create a template 
which ultimately will output to telex, amazingly some industries still 
use them.  Telexes have a fixed width, anything over that width may be 
lost, so I need to wrap.  I have attributes which will be long, 100s of 
words, so I want to wrap them.

I'm thinking that an Output Filter is the way to go, probably something 
based on the AutoIndentWriter.  I've subclassed this and I think I can 
do something in the Write(string str, string wrap) method.  There will 
not be any tabs so I don't have to worry about those.  I guess I can 
reflect to get the current indents and _charPosition, but it would be 
nice if they were protected not private. 

Or am I mad and there is a more obvious way?

--
Scott


More information about the stringtemplate-interest mailing list