At 20:05 09/09/99 , Phillip J. Eby wrote:
At 02:54 PM 9/9/99 +0200, Martijn Pieters wrote:
At 14:33 09/09/99 , Rik Hoekstra wrote:
I define a baseclass derived from CatalogAware and DTMLMethod:
class Base(CatalogAware, DTMLMethod): def index_object(self): # check a few things I want to know about # before indexing, maybe even not allowing # the indexing CatalogAware.index_object(self)
A shot in the dark: Shouldn't this be CatalogAware().index_object(self)? At least this explicitly instanciates CatalogAware and stops raising TypeErrors. But I'm not sure this completely solves your problem
Rik
Sorry, you missed =). In normal python this would work, but as Philip pointed out, when using Acquisition and ExtensionClasses, things are different, and throw the Python interpreter off.
Actually, no, it wouldn't, because then you'd get a different TypeError, this one for having passed too many arguments to the index_object() method. And besides, you don't want to call another object's index_object() method, you want to call an overridden version of *your* index_object() method.
Heh, why does noone ever understand what I am saying =). I ment that _my_ code would normally work in Python. I wasn't commenting on Rik's. There is a reasonable change I might meet him one day. After all, he's only about an hours drive away. =) -- Martijn Pieters, Web Developer | Antraciet http://www.antraciet.nl | Tel: +31-35-7502100 Fax: +31-35-7502111 | mailto:mj@antraciet.nl http://www.antraciet.nl/~mj | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 ------------------------------------------