[Zope] variable name to object

Eugene Saltykov scoff@redcom.ru
Thu, 11 Nov 1999 19:33:30 +1000


Hi everyone

I'm new to Zope so don't blame me for a stupid (maybe) quaestion.

1. I have two ZClasses named Whatever and Whatever2
2. I want to use only one constuctor method for both
3. The constructor input form contains a drop-down to choose appropriate
class (Say, name=ChooseClass)

Problem:

How to convert the CooseClass value (even "Whatever" or "Whatever2" string)
to appropriate object to use with

<dtml-with #DunnoWhatHereToMakeObjectFromCooseClass#>
 <dtml-with "CreateInObectManager("createInObjectManager(REQUEST['id'],
REQUEST))">
 ...
 ...
</dtml-with>
<dtml-with>

It works fine if i write

<dtml-with "Whatever">
 <dtml-with "CreateInObectManager("createInObjectManager(REQUEST['id'],
REQUEST))">
 ...
 ...
</dtml-with>
<dtml-with>

Please help or tell me if it's impossible.

<scoff@i.am>
S3N | Redcom Web Solutions
http://www.s3n.com
t/f (4212) 32 4673