[Zope3-Users] Locatability of schema.Object field

Tom Dossis td at yoma.com.au
Wed May 9 20:56:30 EDT 2007


Alen Stanisic wrote:
> Hi,
> 
> 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:
> 
> http://mail.zope.org/pipermail/zope3-users/2006-December/005090.html

Hi Alen,
I wrote a descriptor for something like this...

http://yoma.svn.sourceforge.net/viewvc/yoma/yoma/trunk/site/property.py?view=markup



More information about the Zope3-users mailing list