[Zope-dev] Advice on DTMLDocument
Steve Alexander
steve@cat-box.net
Fri, 15 Sep 2000 08:43:55 +0100
Andy McKay wrote:
> Hi there,
>
> Well a while ago I came across a bug that I couldnt cut and paste and
> object. A few people helped me out on that, thanks. Ive had a week of
> squishing bugs and finally got to this one. The reason why? I was
> subclassing DTMLDocument but using my own __init__ (similar to one where I
> dont subclass from DTMLDocument), where I didnt fiddle with __name__. The
> result was when absolute_url() was called I was getting:
> http://fork:8080/code/test/ElementWithAttributes !
In your __init__ method, try putting this line in:
YourClassName.inheritedAttribute('__init__')(self, id)
This is assuming that you have the argument "id" in your __init__ method.
I've no idea whether it will solve your problem, as I haven't tried to
reproduce it.
--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net