Petr Knapek wrote:
> 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__
This is 'cos the implementation of _[] is really broken IMHO as it
behaves differently to normal python! _[] will call the returned object
if it can. In this case, it looks like it's getting it wrong and trying
to call something which isn't :(
IIRC, you should be adding your product with something like:
<dtml-with "manage_addProduct['MyTest']">
<dtml-call "manage_addMyTest('your','params','here')">
</dtml-with>
> Can anybody help me how to call create instances of ZClasses
> programatically only in the name-space (not in ZODB) and call their
> functions?
Non-persistent creation of ZClass objects, sorry, don't know how to do
that :(
cheers,
Chris
_______________________________________________
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )