[Zope] Re: selection list confusion ...
Darran Edmundson
Darran.Edmundson@anu.edu.au
Sun, 13 Feb 2000 11:19:47 +1100
Thanks Jim,
>If you are doing this within a ZClass, you can put Choices on a
>PropertySheet, then refer to it as
>
><dtml-in Choices>
As I understand it though, Zope does not have class variables.
If Choices is on a property sheet each instance will have
its own copy which seems like needless bloat.
Ideally, what I'd like to do is either of the following.
Imagine I have the following ZODB hierarchy:
root
Control_Panel
Products
MyClassProduct
MyClass
Properties
- MakeChoice (type selection)
globals
- GetChoices (DTML method)
1) I would like the value field of MakeChoice to call the DTML
method GetChoices which resides in the globals folder. As
it stands, GetChoices needs to live in the root in order
to be found by acquisition. Is there a way around this?
Alternatively,
2) I would like GetChoices to live in MyClassProduct.
This does not work for reasons that elude me. One would naively
think that since GetChoices is in the same location as both
the class addForm and the constructor, it would be found by
acquisition. It isn't.
Any clarification of these issues would be most appreciated.
Cheers,
Darran.