Re: [Webware-discuss] notify me when the session ends

2004-02-26 Thread Jason Hildebrand
On Wed, 2004-02-25 at 04:22, Max Ischenko wrote: Aaron Held wrote: in context/__init__.py from MiscUtils.MixIn import MixIn from WebKit.Session import Session from MaxUtils import NotifyCode class SessionMixIn: def expiring(self): NotifyCode('Session is ending')

Re: Webware extensibility WAS: Re: [Webware-discuss] notify me when the session ends

2004-02-26 Thread Ian Bicking
Jason Hildebrand wrote: storytime Several years ago I wrote a framework in PHP which provided a lot of callbacks for customization. On problem I ran into is that depending on how you need to customize, you might want to execute some code before, instead of, or after an event: preCommit()

Webware extensibility WAS: Re: [Webware-discuss] notify me when the session ends

2004-02-26 Thread Jason Hildebrand
On Wed, 2004-02-25 at 13:37, Aaron Held wrote: Personally I would be against subclassing a 'core' class such as sessions, I would rather see some hooks for calling implementation specific code. Hi Aaron, I'm curious as to your rationale for preferring hooks over using subclasses to do

Re: [Webware-discuss] notify me when the session ends

2004-02-25 Thread Max Ischenko
Aaron Held wrote: in context/__init__.py from MiscUtils.MixIn import MixIn from WebKit.Session import Session from MaxUtils import NotifyCode class SessionMixIn: def expiring(self): NotifyCode('Session is ending') # Now inject the methods from SessionMixIn into Session

Re: [Webware-discuss] notify me when the session ends

2004-02-25 Thread Aaron Held
I'm not sure if the Mixin is the way to go with what you are thinking. Personally I would be against subclassing a 'core' class such as sessions, I would rather see some hooks for calling implementation specific code. This could even give contexts a reason to exists! Something like def

Re: [Webware-discuss] notify me when the session ends

2004-02-25 Thread Max Ischenko
Aaron Held wrote: I'm not sure if the Mixin is the way to go with what you are thinking. Personally I would be against subclassing a 'core' class such as sessions, I would rather see some hooks for calling implementation specific code. Completely agree here. By having found no such hooks, the

[Webware-discuss] notify me when the session ends

2004-02-24 Thread Max Ischenko
Hi. Is it possible to register a callback in WebKit so that my code would be notified when the session ends? thanks. --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD

Re: [Webware-discuss] notify me when the session ends

2004-02-24 Thread Aaron Held
in context/__init__.py from MiscUtils.MixIn import MixIn from WebKit.Session import Session from MaxUtils import NotifyCode class SessionMixIn: def expiring(self): NotifyCode('Session is ending') # Now inject the methods from SessionMixIn into Session MixIn(Session, SessionMixIn)