lastAccess, secondsSinceLastAccess

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

lastAccess, secondsSinceLastAccess

Bernat Romagosa
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

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: lastAccess, secondsSinceLastAccess

Boris Popov, DeepCove Labs (SNN)

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: [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):
  • 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

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: lastAccess, secondsSinceLastAccess

Bernat Romagosa
Thanks Boris!

Now everything makes sense :)

Bernat.

2009/5/20 Boris Popov <[hidden email]>

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: [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):
  • 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

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside




--
O HAI I'M IN UR FOOTER SIGNATURING UR MAILZ

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside