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):
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 _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
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. From: [hidden email] 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):
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 _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Thanks Boris!
Now everything makes sense :) Bernat. 2009/5/20 Boris Popov <[hidden email]>
-- O HAI I'M IN UR FOOTER SIGNATURING UR MAILZ _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |