Progress
Programming
Handbook


System Handles

Progress maintains several global handles that describe the current context of an application. Some system handles reference the widget handle of a context-determined user-interface widget. Others reference data and facilities available for and about the current session. Table 16–1 lists the Progress system handles.

Table 16–1: System Handles
System Handle
Description
ACTIVE–WINDOW
A handle to the Progress window that has most recently received input focus during the session.
CLIPBOARD
A handle to the system clipboard.
COLOR–TABLE
A handle to information on the current color table.
COMPILER
A handle to information on the most recently executed COMPILE statement.
COM–SELF
A component handle to the ActiveX control that generates an OCX event. Accessible within the OCX event procedure that handles the event.
CURRENT–WINDOW
A setable handle to the default window for the Progress session.1,2
DEBUGGER
A handle to the Progress Application Debugger.
DEFAULT–WINDOW
A handle to the static window created by Progress for the session. Every session has one static window.1
ERROR–STATUS
A handle to information on the last statement executed with the NO–ERROR option.
FILE–INFO
A handle to information on an operating system file.
FOCUS
A handle to the field-level widget that currently has keyboard focus (that is, the current field).
FONT–TABLE
A handle to information on the current font table.
LAST–EVENT
A handle to the last event received by the program.
RCODE–INFO
A handle to information on a Progress r-code file.
SELF
A handle for the widget associated with the currently executing user-interface trigger.
SESSION
A handle to information on the current Progress session.
SOURCE–PROCEDURE
A handle to the procedure file that contains the original invocation (RUN statement or function invocation) of the current internal procedure or user-defined function.
TARGET–PROCEDURE
From within an internal procedure: a handle to the procedure file mentioned, explicitly or implicitly, by the original RUN statement that invoked (perhaps through a chain of super procedures) the current internal procedure.
From within a user-defined function: a handle to the procedure file mentioned, explicitly or implicitly, by the original function invocation that invoked (perhaps through a chain of super versions of functions) the current user-defined function.
THIS–PROCEDURE
A handle to the executing external procedure in which the handle is referenced.
WEB–CONTEXT
Provides access to information on the current connection to the Web server.
  1. The initial setting of the CURRENT–WINDOW handle is the Progress static window. CURRENT–WINDOW can also be set to the handle of any dynamic window.
  2. If the THIS–PROCEDURE:CURRENT–WINDOW attribute is set to the handle of a valid window, this window becomes the default window for the executing procedure (overriding the setting of the CURRENT–WINDOW handle). The setting of THIS–PROCEDURE:CURRENT–WINDOW changes the default window only for the current external procedure block

The pointer specified by a system handle has a data type appropriate to the object to which it points. Thus, the THIS–PROCEDURE handle and most other system handles return a HANDLE data type. System handles that reference widgets, such as CURRENT–WINDOW, return a WIDGET–HANDLE data type.

You can change some system handles within an application. For example, you can change the current window by assigning another handle value to the system CURRENT–WINDOW handle. You can establish a menu bar for the default window by assigning a menu bar handle to the DEFAULT–WINDOW:MENUBAR attribute.

For more information on each system handle, see the appropriate reference entry in the Progress Language Reference .


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095