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 onSessionStart... def onSessionEnd.....
Take a look at the callback chain system in pyBloxsom, I think they did a interesting job.
-Aaron
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') # Now inject the methods from SessionMixIn into Session MixIn(Session, SessionMixIn)
Thanks!
I have been thinking about extending the base WebKit for a long time and this is looks like a solution at last.
But, is it possible to call the "parent" or "original" method that 's been substituted?
Quickly inspecting the mixin implementation I would say No but may be I've overlooked something?
Is it possible to register a callback in WebKit so that my code would be notified when the session ends?
------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
-- -Aaron http://www.MetroNY.com/ "I don't know what's wrong with my television set. I was getting C-Span and the Home Shopping Network on the same station. I actually bought a congressman." - Bruce Baum
------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss