Ok, I get the part about the extra paranthesis and how repl works. I can do this now:
---- CL-USER> (second (weblocks:active-sessions)) #<HUNCHENTOOT::SESSION {10025C0001}> CL-USER> (hunchentoot:session-value :remote-ip-addr #<HUNCHENTOOT::SESSION {10025C0001}> ) NIL NIL ----
Cool!
But that still leaves the question about why I'm getting 'NIL' value for an IP address (or for that matter, any session object slot -- I tried session-id, session-string, user-agent, remote-addr, session-start, session-date)?
Thanks,
Yarek
On Mon, May 5, 2008 at 12:13 PM, Yarek Kowalik yarek.kowalik@gmail.com wrote:
Hi Zach,
Thanks for your help!!!
For the second argument I'm using what SLIME gives me for object representation (copied object using middle mouse button). If I want to use the REPL object representation, what would I need to do?
For the command you recommended, I get this:
CL-USER> (hunchentoot:session-value :remote-addr (first (weblocks:active-sessions))) NIL NIL
Is that OK? I'm getting the same values from both the local host and a remote Windows box -- I was expecting two different IP addresses for each of the sessions I have now (first and second in the active session list).
Yarek
On Mon, May 5, 2008 at 12:03 PM, Zach Beane xach@xach.com wrote:
On Mon, May 05, 2008 at 11:58:50AM -0700, Yarek Kowalik wrote:
I'm a lisp newbie, but I am very determined to quickly learn it.
I'm using most recent SBCL with Weblocks. I'm connecting to my SBCL using slime. I'm intrested in examining the ession objects - what's the most effective way of examining the session object?
Here is what I have tried, but obviously I am doing something wrong:
CL-USER> (weblocks:active-sessions) (#<HUNCHENTOOT::SESSION {100245E011}>) CL-USER> (hunchentoot:session-value :remote-addr (#<HUNCHENTOOT::SESSION {100245E011}>) ) ; in: LAMBDA NIL ; (#<HUNCHENTOOT::SESSION {100245E011}>) ; ; caught ERROR: ; illegal function call ; ; compilation unit finished ; caught 1 ERROR condition
... at which point I get into the debugger... What am I doing wrong?
Using too many parentheses for the second argument, and using unreadable object syntax.
Here's something that might work instead:
(hunchentoot:session-value :remote-addr (first (weblocks:active-sessions)))
Zach _______________________________________________ tbnl-devel site list tbnl-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/tbnl-devel