[Zope-dev] Can't fathom 'method-populated' selection lists in Zclasses
Dieter Maurer
dieter@handshake.de
Fri, 18 Jul 2003 21:21:11 +0200
Bob Marshall wrote at 2003-7-18 09:04 -0000:
> ...
> All the documentation I've read says that the 'selection' type for a
> property of a ZClass property sheet can be a variable *or a method*. Fine.
> This works as advertised, except where the method is a method *defined
> within the Zclass* (e.g. as MyZClass.propertysheets.methods.myMethod ). Is
> this a known bug? A feature? Do I need some arcane Zope Zen syntax to unlock
> this behaviour?
>
> N.B. If the method resides *outside* the ZClass (e.g. as a python script
> in the root folder) all things works just fine.
>
> The only 'diagnostic' I get is on the property sheet containing the
> selection type property: it displays e.g. 'No value for myMethod' instead of
> the expected drop-down box.
I used this already and it worked (so I do not have time at the moment
to check whether it still works).
It will not work in the constructor form (as at that time there is
not yet a ZInstance that can access "methods" directly).
It should work as soon as you have a ZInstance.
Dieter