Language Reference Guide : System Classes : SessionObject Class
 
Share this page          
SessionObject Class
The SessionObject class provides an object that contains global data about a running OpenROAD application. When an OpenROAD application starts, a session object is initialized. You can access this session object from any frame or 4GL procedure in the application through the CurSession system variable.
Most of the attributes of the SessionObject class are read-only and provide global information that you can use to customize the application at runtime. For example, you might want to use a different title on the application's starting frame in each window system. To do so, you could use the following code in the starting frame's initialize statement:
initialize(titlemessage = varchar(100)) =
begin
    if CurSession.WindowSystem = WI_MOTIF then
                 titlemessage = 'Welcome to Motif.';
    elseif CurSession.WindowSystem = WI_MSWINDOWS then
                 titlemessage = 'Welcome to Microsoft
                                 Windows.';
    endif;
CurFrame.InfoPopup(messagetext = titlemessage);
end
Inherits From
Object Class
Inherited By
None
Attributes
AppFlags
CallSystemStatus
DBEventPollrate
DBMSErrorPrinting
DBMSMessagePrinting
DisplayCapability
ExitCode
ExternalError
JsonHandler
OperatingSystem
PixelScreenHeight
PixelScreenWidth
ProcessWait
ProcessWindow
Runtime
Scope
ScreenHeight
ScreenWidth
TimeZone
UserName
Version
WindowSystem
Methods
CheckFeature
CreateDirectory
ClearErrorFlag
DirectoryExists
FileExists
GenerateGUID
GetColorName
GetEnv
SetEnv
WinHelp