Session Object

An object representing a running Newlook session.

Client support

   Newlook Smartclient only.

Use

Sessions can be thought of as separate active instances of Newlook executing within a single process.

Each session has its own App, Clipboard, Http and System objects. The Sessions collection is also injected into each Session instance. This ensures that sessions are always accessible to each other.

Newlook must always have at least one session running. For this reason, each time Newlook* starts, a new session is automatically created and any 'startup' logic present in the solution is automatically executed. This session, which can be returned by the Sessions.StartupSession property, cannot be removed at runtime and remains running until Newlook is shutdown.

*Newlook, in this context, can mean Smartclient, the Smartframe Newlook control, the embedded Newlook control, or the Newlook Developer runtime client.

The Add method is used to create additional sessions at runtime. It creates a new Session object in the Sessions collection.

Sessions created using this method do not execute 'startup' logic when they are initiated; instead, they execute whatever action is specified in the options argument of the Add method. Unlike the StartupSession, sessions created at runtime can be destroyed via the Remove method.

Refer to the Working with sessions page for more information about using sessions in your solution.

See Also

Sessions Collection | Working with sessions | StartupSession Property | ActiveSession Property | Add Method - Sessions | Remove Method - Sessions | SetActiveSession Method


© 2004-2021 looksoftware. All rights reserved.