Remove Method - Sessions

Remove a Session Object.

Client support

   Newlook Smartclient only.

Version Support

Introduced in Version 11.1 for Smartclient.

Syntax

Sessions.Remove(name)

Arguments

name - (String, Required)

Name of the session to remove.

Use

This method is useful if you have no further use for a session and you wish to remove it altogether.

If you attempt to remove a session which does not exist, a runtime error will be generated.

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.

Additional sessions that are created using the Add method, can be destroyed using the Remove method.

TIP:

If the session you are closing has an active connection, you will need to handle the sign off and disconnection process, if required, before removing the session.

Examples

J SCRIPT

// Remove the session titled 'Session1'.

Sessions.Remove("Session1");

 

Returns

This method returns a boolean indicating whether the removal was successful or not.

See Also

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

Applies To

Sessions Collection


© 2004-2021 looksoftware. All rights reserved.