Re: How are split, wrap, wrapOn supposed to work?

Robin Becker <[email protected]>
Newsgroups gmane.comp.python.reportlab.user
Message-ID <[email protected]>
Henning,

I fixed up to use the latest code and also tried to get the test working with 
wordaxe. My logging wrapper fails to produce any output presumably because we 
pass a negative width into the wrap call and then the i_wrap function fails 
fairly badly ie loops forever.

I think the platypus Pargaraph wrap succeeds because the standard breaklines 
(which computes the line breaks) always adds at least one 'word' before failing. 
That at least makes the layout proceed even if nonsensically. The result is that 
effectively when negative availWidth is passwed to the wrap method we split the 
line into individual words and ignore the width constraint. The returned width 
is then the maximum word width and the height is leading*len(words).

I looked at your code, but was not able to figure out why the assertion error 
doesn't get raised at line 594.
-- 
Robin Becker
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.