Ok. So
-
add a class to the navigator, call it something you’ll remember.
-
Set its super to URLConnection
-
Add a private property
mSession as String
-
Add a Constructor with the code
mSession = Session.Identifier
-
Implement the events and right click on each event and click Create Event Definition from Event (or whatever it’s called)
-
In each event, you’ll need code like this:
Var ctx as new webSessionContext(mSession)
-
Then you’ll need code to raise the event. So for Error, you’d write:
RaiseEvent Error(e)
The context will cause the session to be valid while the context property exists.
From now on you use this class when you need access to the session it came from.
The advantage of doing it this way is that ctx will be nil if the session no longer exists. So if the user closes their browser you can just check to see if session is nil.