[Zope-dev] Referring to same interface using zope.schema.Object

Joe Steeve js at hipro.co.in
Fri Jul 22 06:59:32 EDT 2011


Hello,

I am trying to construct an object tree. Every node in the tree is of
the same type. I am trying to achieve something like:

        class INode(Interface):
        
            parent = Object(
                title=u"Parent node",
                schema=INode
                )
        
            children = List(
                title=u'Child nodes',
                value_type=Object(schema=INode)
                )

The above fails with "NameError: name 'INode' is not defined". Any clues
as to how to solve this?

Regards,
Joe

-- 
Joe Steeve
HiPro IT Solutions Pvt. Ltd.
http://hipro.co.in/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20110722/182facd2/attachment.bin 


More information about the Zope-Dev mailing list