[Seaside] lastAccess, secondsSinceLastAccess
Boris Popov
boris at deepcovelabs.com
Wed May 20 01:08:24 UTC 2009
In your case last access is 0 because you are just accessing it now :) You need your own 'start' variable if you want to track total session time, just set it to Timestamp now in #initialize and then add #minutesSinceStart that subtracts that from current time.
-Boris (via BlackBerry)
________________________________
From: seaside-bounces at lists.squeakfoundation.org
To: Seaside - general discussion
Sent: Tue May 19 18:02:46 2009
Subject: [Seaside] lastAccess, secondsSinceLastAccess
Hi all,
I subclassed WASession to have my own session class, now I need to know for how long the current user has been logged in, so I found these two methods belonging to WAExpiringHandler, of which WASession is a subclass (hence, from which my session class also inherits):
* lastAccess
* secondsSinceLastAccess
But when calling html text: self session lastAccess I get a couple of beautiful symbols (namely: ����). Tried to send every asSomething I found but couldn't get it to print a date or a time.
Then I tried calling html text: (self session secondsSinceLastAccess) asEverything but the best output I got was a zero.
Could you please point to me the proper way to get this information from the current session? I googled for a long while, but seaside session time and similar queries only pointed some interesting travel suggestions to me ;)
Thanks a lot in advance!
Bernat.
--
O HAI I'M IN UR FOOTER SIGNATURING UR MAILZ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20090519/cdb05ccc/attachment.htm
More information about the seaside
mailing list