Returns an object, the session that was created when this instance of Newlook started.
Sessions.StartupSession = [session object]
Newlook Smartclient only.
Introduced in Version 11.1.
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.
If you need to create a variable which will persist regardless of which sessions are created and removed, it should be created in the startup session.
There are various ways of identifying the startup session:
Sessions.StartupSession
returns the startup session for the current Newlook instance.
Sessions.<SessionName>.IsStartup
returns True for the startup session. This can be helpful if you want to check whether the current session is the startup session before executing some logic (setting a Newlook variable for instance).
The following example creates a Newlook variable in the current startup session.
// Set the variable 'vFlag' in the startup session .
Sessions.StartupSession.App.SetValue("vFlag", true);
© 2004-2021 looksoftware. All rights reserved.