[Bese-devel] unwinding

Jan Rychter jan at rychter.com
Sat Oct 29 11:41:40 UTC 2005


>>>>> "Marco" == Marco Baringer <mb at bese.it> writes:
 Marco> Jan Rychter <jan at rychter.com> writes:
 >> Ok, I've gotten to the point where I actually need this. Is there a
 >> function that I can call that will discard the current session along
 >> with all data (allowing it to be gc'd) and take me back to an entry
 >> point?
 >>
 >> There seems to be delete-session, but it isn't exported from UCW and
 >> I need to pass it the current session. Does it do The Right Thing?

 Marco> delete-session is what you're looking for (i'll export it
 Marco> asap). your other option is to use the new JUMP macro (and
 Marco> associated JUMP-TO-COMPONENT method). It will call a new
 Marco> component (just like CALL) but will drop everything in the
 Marco> session (including the session's object-table), it's just like
 Marco> delete-session except that the actual session object isn't
 Marco> deleted (so the session id remains the same).

 Marco> what i think you'd do (but i'm not really sure this is the
 Marco> clearest way to go about it) is something like this (asthe last
 Marco> thing in an action):

 Marco> (jump 'redirect-component :target "/entry-point-url")

What I have now is:

(defaction confirm ((c logout))
  (ucw::delete-session *movie-manager-application*
                       (ucw::find-session *movie-manager-application* *context*))
  (setf (ucw::frame.window-component (ucw::context.current-frame *context*))
        (make-instance 'redirect-component :target "main")))

Is this roughly the right thing to do?

I'd suggest that there be one single function that would delete the
current session and go back to an entry point.

--J.



More information about the bese-devel mailing list