I have a class attribute defined in an interface as such:

    description=Object(
        title=_(u"Description"),
        description=_(u"Description of the activity."),
        required=True,
    )

I used Object because this attribute can be one of several different
class instances.  

But I get an error:
TypeError: __init__() takes exactly 2 non-keyword arguments (1 given)

When the implementation is attempting to import the interface.

But if I enter a default=None or
 
    description=Object(None,
        title=_(u"Description"),
        description=_(u"Description of the activity."),
        required=True,
    )

I get:
 File
"/home/tim/buildout-eggs/zope.schema-3.4.0-py2.4.egg/zope/schema/_field.py", 
line 453, in __init__
    raise WrongType
zope.schema._bootstrapinterfaces.WrongType

I do not have these issues using many of the other zope.schema types.

Thanks,
Tim




-- 
Timothy Cook, MSc
Health Informatics Research & Development Services
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook 
Skype ID == timothy.cook 
**************************************************************
*You may get my Public GPG key from  popular keyservers or   *
*from this link http://timothywayne.cook.googlepages.com/home*
**************************************************************

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to