[Zope] ZClass
Petr Knapek
knapek@knapek.pvt.net
10 Aug 2000 17:03:36 +0200
Hi Zopists,
I have created a ZClass (TestClass) with an external python function
'foo'. Now I would like to create an instance (myTest) of my TestClass
in a dtml template and call its method foo.
When I put the code below
<dtml-let myTest="_['Control_Panel']['Products']['TestProduct']['TestClass']">
<dtml-var "myTest.foo()">
</dtml-let>
I can see this error:
Error Type: AttributeError
Error Value: __call__
When I looked at the returned type of myTest.foo, the Zope says that it
is an instance of Folder.
Can anybody help me how to call create instances of ZClasses
programatically only in the name-space (not in ZODB) and call their
functions?
Petr
--
Petr Knápek
NEXTRA Czech Republic, s.r.o., Veveří 102, 659 10 Brno, Czech Republic
e-mail: mailto:petr.knapek@nextra.cz
tel:+420-5-41 558 394
FAX:+420-5-41 558 390