Login
`
Templates, Tools and Utilities
|
||
Icetips Article
Back to article list
Search Articles
Add Comment
Printer friendly
Direct link
Par2: Notes on logout 2003-12-10 -- Jim Kane By it's nature logout is designed for all or none so breaking it up is not a
good answer.
My "solution" is to let the logout take as long as it has to and if a 2nd
use comes along and logout fails, display a window telling the user, there
is going to be a little wait and they can cancel if they want.
Jim Kane
logoutfailed=false
logout(.1......)
if errorcode() then
logoutfailed=true
open(waitwindow)
display()
accept
case event()
of event:timer
0{prop:timer}=0
logout(.1,.....)
if errorcode()=logoutalreadyactive then cycle.
if ~errorcode() then
logoutworked=true
post(event:closewindow)
cycle
end
0{prop:timer}=100
of event:accepted !cancel button
0{prop:timer}=0
logoutfailed=true
post(event:closewindow)
end
end
close(waitwindow)
if logoutfailed then
!abort and the user did it
end
end
!continue with file IO
When I wrote a class to do the above, I remember having to fool arround with
the code so the button would work and cancel but finally got a good balance
between the timer and the logout attempt length.
Today is November 21, 2024, 3:47 am This article has been viewed 35213 times.
|
|