Roman Klesel wrote at 2006-3-3 10:26 +0100:
> ...
>Yes, this is what I understood (at least I think so) now. So the question is:
>How will the method find out what object I want it to operate on if I call it 
>in this way
>context/genGraphs or objref/genGraphs

It cannot.

It works for a PythonScript because in this case you acquire
an object (and not a method) and then call its method ("__call__").
The difference is that an object is acquired, not a method.

You can try to arrange things this way even with classes defined
in products:

   You define a new class "WC", derived from "Implicit".
   Its "__call__" method does, what you would like to happen.
   In "__call__", you access the acquisition context with

   In your class "C", you instantiate "WC":

      test3 = WC()

   You can then acquire "test3" (it now is an object, no longer
   a method) and call it. In "test3.__call__", "self.aq_parent"
   will be the object, from which you acquired "test3".

Zope maillist  -
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to