[Zope] Getting select contents from parent object

VanL van@lindbergs.org
Wed, 07 Aug 2002 09:21:36 -0600


Thanks for the help.  However, I am afraid that I'm not doing these as 
ZClasses, but python products.
I havesome initialization code like:

thisApple = Apple.Apple(id)
self._setObject(id, thisApple)
thisApple = self._getOb(id)

Now I would like to do something like:

PropertyManager.manage_addProperty(thisApple, 'apple_type', 
[parent].list_apple_types, 'select', None)

(all of the above on one line if it got wrapped)

It is referencing the [parent].list_apple_types function during (or 
shortly after) object creation that I can't figure out how to do.

Thanks,

VanL




Tino Wildenhain wrote:

> Hi VanL,
>
> if you start defining your zclass, simply put the name of the function
> into the "value" field for property type "select"
> This is all you need.
>
> If you want to try out this while authoring the zclass, you have
> to move the method to a place, where it can be seen from 
> Control_Panel/Products,
> like / (root)
>
> Happy zoping
>
> Tino
>