[reportlab-users] Table split

Casey Duncan reportlab-users@reportlab.com
Tue, 15 Oct 2002 16:28:50 -0400

On Tue, 15 Oct 2002 20:46:10 +0100
Robin Becker <robin@reportlab.com> wrote:

> >Is split called when the table is too wide as well? Why not just raise an error 
> >here instead of returning an empty list?
> >
> >-Casey
> I think this is a philosophical difference. We always test for splitting
> if the original layout attempt fails, in this case the layout engine
> determines that your table won't fit in the original case (it's too
> wide) and that it won't fit in the split case either (it's too wide).
> The fact that it appears to work if you disable the failure just means
> that your table is not very wide. Suppose I do the same in all frames
> then some "not very wide" table will eventually overlay something that
> isn't white space and then we'll need to re-implement the "correct"
> approach.  

I don't disagree that the table is to blame, but it would be helpful if it outputted some warning or even failed altogether if the table is too wide, regardless of whether it is split.

So, why not raise an assertion error here or is is possible for the layout engine to recover from this in some cases? As it stands this seems much harder to debug then it needs to be. There is no external indication that the table width is the cause of this without some digging.

It seems like it would be helpful for a warning log to be generated during building to make tracking this down easier.


P.S. Just so that I don't just sound like a complainer, I think this is an excellent tool. It's obvious the amount of work and thought that has gone into it. Thanks!