[Product-Developers] subclass ATWorkgroup
craig_swank at nrel.gov
Thu Jun 18 15:44:59 UTC 2009
When I try:
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.
Raphael Ritz wrote:
> cswank wrote:
>> 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
> (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?
>> When I set a pdb trace to see what obj is, it is an instance 'type', but
>> has no memory address. Is there something I'm missing when I am doing
>> PS. The only reason I'm doing this is because I want the title field of
>> content type to be populated with a SelectionWidget. Perhaps there is
>> way I can do this without subclassing?
> Product-Developers mailing list
> Product-Developers at lists.plone.org
View this message in context: http://n2.nabble.com/subclass-ATWorkgroup-tp3088643p3114107.html
Sent from the Product Developers mailing list archive at Nabble.com.
More information about the Product-Developers