Returns whether the current session is the StartupSession. Runtime-only.
Sessions.<SessionName>.IsStartup = [boolean]
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.
The IsStartup property 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. For instance, if you need to create a variable which will persist regardless of which sessions are created and removed.
The following example checks if the current session is the StartupSession and sets a Newlook variable if it is.
// Set the variable 'vFlag' if the current session is the startup session.
if (Sessions.ThisSession.IsStartup == true)
{
App.SetValue("vFlag", true);
}
© 2004-2021 looksoftware. All rights reserved.