When I try: ATWorkgroup.__init__(self,*args,**kw)
in my __init__ I get: TypeError: unbound method __init__() must be called with ATWorkgroup instance as first argument (got Vendor instance instead). And when I try not defining an __init__ method then I can initialize my class, but the ATWorkgroup tabs (such as Add Members and Workgroup Roles) do not appear. So I guess I'm still stuck. Craig Raphael Ritz wrote: > > cswank wrote: >> Hello, >> I am trying to subclass ATWorkgroup. When my __init__: >> >> def __init__(self, *args, **kw): >> super(Vendor, self).__init__(*args, **kw) >> >> gets called I get the following error: >> >> TypeError: super(type, obj): obj must be an instance or subtype of type > > Depending on how ATWorkgroup is defined it might not support > calling 'super'. Try calling > > ATWorkgruop.__init__(self,*args,**kw) > > (or similar) instead (ATWorkgroup being the class here). > This may well apply to all AT-based types. > > I simply don't know whether we moved the entire stack to > using new-style classes by now. > > Does that make a difference? > > Raphael > > >> >> When I set a pdb trace to see what obj is, it is an instance 'type', but >> it >> has no memory address. Is there something I'm missing when I am doing >> this? >> >> Thanks, >> >> Craig >> >> PS. The only reason I'm doing this is because I want the title field of >> my >> content type to be populated with a SelectionWidget. Perhaps there is >> some >> way I can do this without subclassing? > > > _______________________________________________ > Product-Developers mailing list > [email protected] > http://lists.plone.org/mailman/listinfo/product-developers > > -- View this message in context: http://n2.nabble.com/subclass-ATWorkgroup-tp3088643p3114107.html Sent from the Product Developers mailing list archive at Nabble.com. _______________________________________________ Product-Developers mailing list [email protected] http://lists.plone.org/mailman/listinfo/product-developers
