+-------[ Roman Klesel ]----------------------
| Andrew Milton schrieb:
|  > | <ul>
| > |  <li tal:repeat="elem context/objectValues"
| > |   <img tal:attributes="src string: ${elem/absolute_url}/genGraph"> plot 
| > |  </li>
| > | <ul>
| > 
| > In what way doesn't this work? I've certainly used this pattern in my FS
| > products without problems.
| >
| Hmm? Did I miss something? A few posts above we recoginzed that when I would 
| def genGraph(self):
|     "bla"
|     return self.data
| then genGraph would return data from the class where it is defined and not 
from the object acquiring it. So it would fail.

How about you forget about Acquisition for now.

Define the method in the class you want to call it on.

Once you're happy with the way that works, you can use Acquisition to keep
things like state or configuration for a particular path.

If you CAN'T define the method in the class (not sure why you couldn't), then
you will have to define a method and pass an instance or a reference.

Andrew Milton
Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to