Hook "WACurrentRequestContext" into debugger?

Mariano Martinez Peck <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.squeak.seaside,gmane.comp.lang.smalltalk.pharo.devel
Message-ID <CAA+-=mXWu_nFNy8wCk-1jYY3cLtRnoh3vW4gyBVKTxrgx-Y0TA@mail.gmail.com>
Hi guys,

This thing I will ask in this email it's in my mind since YEARS. But I have
always thought it was like that and that there was nothing we could do.
However, I think it's time I ask again :)

For those that have used Seaside, and you try to debug, you know that upon
request processing seaside uses Exceptions mechanisim to always have access
to the request, session, etc. They way that is done is very smart :)

 WACurrentRequestContext use: self during: aBlock

In that case, "self" is the request instance and aBlock the closure that
takes care of the request processing. So, inside that closure, everywhere
you do "WACurrentRequestContext value" you get the correct request instance.

So..that's great for Seaside, but debugging gets complicated. While you can
restart, proceed, etc, once inside debugger, you  cannot evaluate any piece
of code that will use the session  or request because you get
a WARequestContextNotFound. Of course, because I guess the evaluation you
do from cmd+d on a piece of text or via the debugger inspector, creates
another closure/context which does not receive the WACurrentRequestContext
instance.

Now....besides WACurrentRequestContext I have my own class
UserContextInformation where I basically have a bunch of stuff associated
to the logged user. And I do exactly the same as the
WACurrentRequestContext. And I have the same problem. I really want to be
able to fix this.

Anyone have an idea on how can I do it? I guess I can change the debugger,
in the place where I evaluate code so that I wrap that evaluation with my
request context instance???

Thoughts?


-- 
Mariano
http://marianopeck.wordpress.com

_______________________________________________
seaside mailing list
[email protected]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.