SESSION system handle
A handle to the current ABL session object. This object allows you to read and modify the current ABL session context.
Syntax
attribute
method
Attributes
Methods
ExampleThe following example uses the SESSION:IMMEDIATE-DISPLAY attribute. When dumping or loading records from the database, the procedure displays a running count of records. If IMMEDIATE-DISPLAY is false, no value is shown until all records are dumped or loaded. At that point, the total is shown. To prevent this, IMMEDIATE-DISPLAY is set to true just before the dump or load and then reset to false afterwards.
Notes
- Several attributes of the SESSION handle control the execution of ABL code during the current ABL session. This means that the SESSION handle controls the behavior of any code that you are developing and testing, and the OpenEdge ADE toolset. While the tools of the OpenEdge ADE monitor and set the attributes of the SESSION handle to meet their needs, it is possible that the execution of a procedure that sets attributes of the SESSION handle may affect the display and behavior of the OpenEdge ADE toolset.
- The FIRST-PROCEDURE and LAST-PROCEDURE attributes are set or reset when you create or delete the first or last persistent procedure in a session. You can use procedure attributes to navigate the procedure entries, reference information, and manage the user interface for each persistent procedure in the procedure chain accessed by FIRST-PROCEDURE and LAST-PROCEDURE.
For more information on the attributes of procedure handles, see the Procedure object handle reference entry. For information on creating a persistent procedure, see the RUN statement reference entry. For information on deleting a persistent procedure, see the DELETE PROCEDURE statement reference entry.- The FIRST-SERVER and LAST-SERVER attributes are set or reset when you create or delete the first or last server handle in a session. You can use server handle attributes and methods to navigate the current chain of server handles, connect to a running AppServer, reference information on a connected AppServer, access remote persistent procedures running on a connected AppServer, and disconnect from a connected AppServer for each server handle in the chain accessed by FIRST-SERVER and LAST-SERVER.
For more information on the attributes and methods of server handles, see the Server object handle reference entry. For information on creating server handles, see the CREATE SERVER statement reference entry.- Setting the IMMEDIATE-DISPLAY attribute to TRUE can significantly slow performance. However, some code segments may not execute properly with IMMEDIATE-DISPLAY set to FALSE. If a segment of code requires that IMMEDIATE-DISPLAY is TRUE, you should set the attribute to TRUE immediately before the code segment and change it back to FALSE immediately after the segment.
- In Windows, when execution is blocked for input (by a WAIT-FOR statement, for example), the AVM listens for messages from the windowing system. This allows the AVM to multitask properly with other Windows applications. However, if your ABL application performs long processing without blocking for input, then it may not multitask properly because the AVM does not automatically check for messages from the windowing system. To force the AVM to poll for windowing system messages during this time, you can set the MULTITASKING-INTERVAL attribute to a non-zero value. The lower the value, the more often the AVM checks for messages. This may decrease ABL performance. The maximum value is 9999. A value of 0 inhibits polling until ABL blocks for input.
If you set MULTITASKING-INTERVAL to a non-zero value for a code segment, reset it to 0 immediately after that code.- The AVM sets the TEMP-DIRECTORY attribute to the value you specify for the Temporary Directory (-T) parameter. If you omit the -T parameter, TEMP-DIRECTORY is set to your current working directory.
- The TYPE attribute returns the widget type, PSEUDO-WIDGET.
- Use the SET-WAIT-STATE method to prevent user and system input, and provide visual feedback during a long computation or other background process. The value you pass determines the type of wait message or cursor the windowing system displays for the user. Passing the value "" to SET-WAIT-STATE ends the wait state. Use this method only for long computations or other processes that force the user to wait significantly longer than the usual response time.
- If you set a wait state for your application, the AVM automatically ends the wait state if it displays an alert box, a dialog box, or message update.
- For SpeedScript, the invalid attributes are: APPL-ALERT-BOXES, CONTEXT-HELP-FILE, DATA-ENTRY-RETURN, FIRST-CHILD, HEIGHT-PIXELS, LAST-CHILD, PARAMETER, PIXELS-PER-COLUMN, PIXELS-PER-ROW, SUPPRESS-WARNINGS, SYSTEM-ALERT-BOXES, THREE-D, TOOLTIPS, V6DISPLAY, WIDTH-PIXELS. The GET-PRINTERS( ) method is invalid for SpeedScript.
- To access the list of all forms created in a session, use the SESSION handle FIRST-FORM and LAST-FORM attributes along with the NextForm and PrevForm properties of the Progress.Windows.IForm interface. In addition, to .NET forms, this list also contains Progress.Windows.FormProxy object references to all ABL windows created in a session, allowing you to manage .NET forms and ABL windows in a common manner. The SESSION handle FIRST-CHILD attribute, NEXT-SIBLING attribute, LAST-CHILD attribute, and PREV-SIBLING attribute only reference the list of ABL windows in a session.
See alsoNextForm property, PrevForm property, Progress.Windows.FormProxy class, Progress.Windows.Form class, Progress.Windows.IForm interface
OpenEdge Release 10.2B
|