explicit object reference without acquisition
I would like to call an Zope object (and pass variables to it) located in a folder that is not reachable by acquisition from a DTML method. When I tried the following it failed: E.g. If I have a dtml method in the folder "/a/b" called index_html. Inside of this dtml method I have the following statement <dtml-var expr="c.d.e.(var1='var1')"> The Zope folder object "/c/d/e" exists and has a DTML method inside it called index_html that references the variable var1. When I try to evaluate the above expression, I get the following error: Error Type: AttributeError Error Value: __call__ What am I doing wrong? I would like to make use of objects inside of Zope that are not reachable by acquisition via the <dtml-var>' or <dtml-call>' methods. Thanks, Brad Dickerson The information contained in this message is confidential and is intended for the addressee only. If you have received this message in error or there are any problems, please notify the sender immediately. The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden.
I would like to call an Zope object (and pass variables to it) located in a folder that is not reachable by acquisition from a DTML method. When I tried the following it failed: E.g. If I have a dtml method in the folder "/a/b" called index_html. Inside of this dtml method I have the following statement
<dtml-var expr="c.d.e.(var1='var1')">
The Zope folder object "/c/d/e" exists and has a DTML method inside it called index_html that references the variable var1. When I try to evaluate the above expression, I get the following error:
Error Type: AttributeError Error Value: __call__
What am I doing wrong? I would like to make use of objects inside of Zope that are not reachable by acquisition via the <dtml-var>' or <dtml-call>' methods.
You're trying to call a folder, which does not work, as it has nothing to render (it has no '__call__' method). If you say:: <dtml-var "c.d.e.index_html(var1='hey')"> it works fine. The 'index_html' magic is not used in a call like that. --jcc -- "Code generators follow the 80/20 rule. They solve most of the problems, but not all of the problems. There are always features and edge cases that will need hand-coding. Even if code generation could build 100 percent of the application, there will still be an endless supply of boring meetings about feature design." (http://www.devx.com/java/editorial/15511)
participants (3)
-
Brad Dickerson -
Dylan Reinhardt -
J Cameron Cooper