[Zope] using the Session Data Object hooks
Chris McDonough
chrism@zope.com
11 Aug 2002 00:14:33 -0400
The registered function can be either a path or a string representing a
Zope object path. So use the Zope object path to a python script if you
want to register a callback to a Python Script programatically.
It registered function actually accepts two arguments: the first
argument is the session data object being added or expired. The second
argument is the transient object container which contains the session
data object.
This will be better documented in an upcoming release of the Zope Book.
On Sat, 2002-08-10 at 23:02, Dennis Allison wrote:
> The Session Data Object exposes the Transience Interfaces
>
> setDelNotificationTarget(self, f )
>
> and
>
> setAddNotificationTarget(self, f)
>
> which register f to be called when a session object is added or deleted. The
> registered function is supposed to accept a single argument, item, the object
> being added or removed.
>
> So, how does one write a PythonScript to do this? Or must it be an External
> Method and/or a product Extension? It should be straightforward enough as
> it's part of the normally exposed interface.
>
>
>
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> 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 )