[Zope3-Users] Locatability of schema.Object field

Alen Stanisic alen.stanisic at gmail.com
Tue May 1 21:22:02 EDT 2007


in the following situation:

class ISomeNames(IContained):

     items = List(... value_type=Object(schema=IName ..) )

class IName(Interface):

     afield = Choice(... vocabulary="AVocabulary" ..)

say in the vocabulary I need to look up containment tree but IName
object does not have enought context set so I assume schema.Object
fields are not locatable.  Or I guess they could be, my understanding
is that you could also point to an existing persistent object using
schema.Object field, which is not really what I am trying to do here.
I just want ISomeNames to be composed of list of IName objects.

I have read a bit about contained proxies.  Is the solution here to
wrap IName with this proxy and make it appear as if it is contained by
the container of ISomeNames.  How would I do that?  Or is there a way
to refer back to ISomeNames from IName?

Also this thread touches on the subject of schema.Object locatability:


Thanks in advance

More information about the Zope3-users mailing list