I have a product with a proxy class for building objects which
manage data for other objects. The proxy clients locate their proxy
via meta_type, similar to a sql connection_id and use acquisition
to establish parameters for each call.  I want to pass method calls
made to the clients directly to the proxy, but in the context of
the client.

Right now, my clients have a method:

    def Proxy(self):
        """Return the proxy associated with this object"""
        return getattr(self, self.proxy_id)

which is used in conjunction with dtml-with to establish the

<dtml-with Proxy>
<dtml-in "getTable(project=Project, [...])">

This works fine, however, I would like for the clients to automatically
pass method calls that they don't have on to the proxy. __setattr__
is not called for the proxy clients because the final URL component
specifies an acquired folder method, not the proxy client. I tried
__bobo_traverse__, but again, the final URL component is passed as
the argument instead of the method, so it's not clear exactly how
__bobo_traverse__ could make sense out of what needs to be done,
much less know what method was to have been called.

Is there a proper way to call a proxy object's method in this
context, directly in the product class, without using dtml-with?


Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to