GUIBuilder: Generated Program Variables (Superseded)
GUIBuilder has been superseded by the AppBuilder module in the BASIS IDE for BBj. Includes support for both the READRECORD Event Queue and PROCESS_EVENTS/CALLBACK paradigm. Integrates tightly with FormBuilder, the BBj replacement for ResBuilder.
Description
This is a list of the variables and functions available to developers in programs generated by GUIBuilder.
Variables Available in All Parts of the Program (including Initialization and End of Job):
|
Variable |
Description |
|---|---|
|
gb__arg$ |
Argument passed in a CALL statement and retrieved in the ENTER line of the generated program. |
|
gb__args |
Number of values passed in |
|
gb__sysgui$ |
Name of the SYSGUI alias, taken from the config.bbx file. |
|
gb__sysgui |
Channel on which the SYSGUI device ( |
|
gb__sysprint$ |
Name of the SYSPRINT alias, if one was defined in config.bbx. If no SYSPRINT device exists in config.bbx, then |
|
gb__win_id$ |
Initialization: The first window ID found in the resource file. |
|
gb__win$ |
Template associated with this string contains each of the form and window names defined in this program's resource file; the value of each field is the context of the given form or window. For example, if a form is named "Main" and its context is 0, then |
Variables Available Only within the Event Loop
|
Variable |
Description |
|---|---|
|
gb__event$ |
Event record. It is dimensioned using TMPL( |
|
gb__notice$ |
Notice string for the current Notify event. This string is only meaningful if |
|
gb__win_id$ |
Current window ID. For example, if the current window is a top-level form with an ID of 100, then |
|
gb__eoj |
This variable can be set to any non-zero value to force termination of the event loop. |
Both gb__event$ and gb__notice$ are set at the top of the event loop:
dim gb__event$:tmpl(gb__sysgui)
gb__event=len(gb__event$)
dim gb__generic$:noticetpl(0,0)
gb__eoj=0
repeat
read record (gb__sysgui,siz=gb__event,err=gb__event_loop_end)gb__event$
if gb__event.code$="N" then
: gb__generic$=notice(gb__sysgui,gb__event.x%);
: dim gb__notice$:noticetpl(gb__generic.objtype%,gb__event.flags%);
: gb__notice$=gb__generic$
body of the event loop
until gb__eoj
Note that all variables defined by the framework start with gb__ (with two underscores). Similarly, all functions defined by the framework start with fngb__.