[reportlab-users] Fw: [PATCH] _Container uses _hAlignAdjust() without defining it

Robin Becker robin at reportlab.com
Mon Mar 15 10:21:35 EDT 2010


On 15/03/2010 12:29, Tay Ray Chuan wrote:

> Hi list,

>

> sorry if this email appears twice; I'm re-sending because the mailing

> list archives doesn't seem to

>

> I hit on this today. I believe the _hAlignAdjust() being referenced is

> Flowable's implementation, hence this patch. If another _hAlignAdjust()

> is being referred to, then please disregard this patch.

>

> -- >8 --

> --- a/reportlab/platypus/flowables.py 2010-03-14 10:06:50.578125000 +0800

> +++ b/reportlab/platypus/flowables.py 2010-03-14 10:07:05.656250000 +0800

> @@ -741,7 +741,7 @@

> else:

> return deepcopy(obj)

>

> -class _Container(_ContainerSpace): #Abstract some common container like behaviour

> +class _Container(_ContainerSpace,Flowable): #Abstract some common container like behaviour

> def drawOn(self, canv, x, y, _sW=0, scale=1.0, content=None, aW=None):

> '''we simulate being added to a frame'''

> pS = 0

> --

> --

> Cheers,

> Ray Chuan

........

I think you are right in detail, but wrong in the big picture. I think that
_Container is intended as a mixin to be used in addition to Flowable in classes
inheriting from Flowable. By itself _Container doesn't do very much. If you can
show a plausible use for instantiating _Container directly then perhaps we
should reconsider.
--
Robin Becker


More information about the reportlab-users mailing list