Hi Brice On 07/16/2013 04:51 PM, Brice Hamon wrote: > Hi guys, > > I have 2 questions: > > 1) when using SESSION, is there a way to get notified when a session > expires or is closed by rivet? I need to do some cleanup on my side > when a user goes away. >
Currently I can think of only 2 possible ways: 1 - DBMS triggers: if your cleanup is related to other data stored in other tables you may design your DB schema so that you can use the session_id column as key for picking the rows you want to remove (see Mysql manual for triggers and stored procedures) 2 - Subclass Rivet's Session class and override the do_garbage_collection method. Just remember to call the superclass method after you have carried out your cleanup tasks. I proposed to reimplement Session as an TclOO class preserving the interfaces as much as possible: using OO system would make available to the programmer filter methods that could be configured at run time > 2) Is there something special to do before using forms? I am getting > a: > > > invalid command name "::rivet::form" while executing "::rivet::form > myform -defaults response -method post -action {logout} -name > logout" package require form should create the form command in the global namespace, not within the ::rivet namespace (we ought to introduce a namespace for it) > > while all other packages so far are working fine (DIO, SESSION). > > Thank you, > > B. > -- -- Massimo Manghi Dipartimento di Neuroscienze Unità di Biofisica e Fisica Sanitaria via Volturno 39 43125 Parma --------------------------------------------------------------------- To unsubscribe, e-mail: rivet-dev-unsubscr...@tcl.apache.org For additional commands, e-mail: rivet-dev-h...@tcl.apache.org