|
Document revision: 2024-05-27
Refers to JDLG version: 2.0.18
Contents
Application object
The Application object is a hard-coded top-level object. It provides an
interface to the current session's configuration and runtime parameters.
Note: The Application object is specific to the
current session.
- atom[] : integer or string, get/set
- DLG SET "Application.atom[NAME]" stores the specified
integer or string value associated with NAME in the Application object.
This is called a local atom.
DLG GET "Application.atom[NAME]" may then be used in the
current session to query the atom
value for NAME. An empty string is returned if the atom
is not set.
A local atom can be deleted by passing an empty string.
Atoms stored in the Application object are accessible to the
current session and stay in memory until
the session ends. They provide a way to pass information to other program
modules, or to retain information for the next invocation of the same module.
For global atoms, allowing to pass information to
other sessions, please refer to the
System.atom[] documentation.
Program example:
DLG GET "Application.atom[sample]",Value$
IF LEN(Value$) THEN
PRINT "sample atom is present."
ELSE
PRINT "sample atom is not present"
DLG SET "Application.atom[sample]","TIME="&TIME$
END IF
PRINT "value=";Value$
- atoms : string, get
- Returns a list of the currently stored local atom names
in alphabetical order. The atom names are separated by LF (ASCII 10).
An empty string is returned if no local atoms are stored.
See also atom[] above.
- baseurl : string, get/set
- Used to compose the session's base URL.
A session's base URL is defined by the
System.baseurl
attribute or the eloquence.config.baseurl
configuration property, followed by the baseurl value, as shown
in the example below.
Any relative URL, specified in DLG files or with DLG SET, is prepended with
the session's base URL.
For example:
System.baseurl = "http://intranet/jdlg/"
Application.baseurl = "erp/"
Dialog.Image.url = "logo.png"
Resulting URL:
http://intranet/jdlg/erp/logo.png
- browser or browser[] : string, set
- Submits the specified URL to the
configured browser.
The browser loads the referenced document and displays it or calls
an appropriate helper application to open the document.
If a relative URL is specified, the value of the
baseurl
or System.baseurl attribute
or eloquence.config.baseurl
configuration property is prepended.
If Java Webstart is used to start the
JDLG process, the browser is automatically configured. Otherwise, the
eloquence.help.cmdpre and
eloquence.help.cmdpost
configuration properties are used to invoke the browser.
Note: Since JDLG version 2.0.16 an index may be specified, for example:
DLG SET "Application.browser[DOC]",Doc_url$
This is a WEBDLG2 compatibility option, JDLG
ignores the index. WEBDLG2 recognizes an optional
index as target name, to reuse a specific browser window or tab if it is
already open.
- class : string, get
- Returns "Application".
- clipboardcontextmenu : string, get/set
- Allows to override the global clipboard context menu configuration
with a session-specific value.
For details, please refer to the documentation of the
eloquence.config.clipboardcontextmenu
configuration property.
By default, this is the value of the
System.clipboardcontextmenu
attribute or the
eloquence.config.clipboardcontextmenu
configuration property.
Note: Requires JDLG version 1.5.7-110518-1310 or newer.
- closeprinter : integer or string, set
- Close the current print job. The argument is ignored.
See also openprinter below.
- dialogscaling : integer, get/set
- Alias for the enablescalefactor
attribute (provided for backward compatibility).
- dnsname : string, get
- Returns the DNS host name of the system where JDLG runs. If the host name
cannot be resolved, the IP address is returned.
(Note: An IPv6 address is enclosed in square brackets.)
- enablemaximize : integer, get/set
- Provides the session's default value to enable or disable the
Dialog auto-maximize
function.
Nonzero: enable the
auto-maximize function
Zero: disable the
auto-maximize function
If not set, it defaults to the value of the
System.enablemaximize
attribute or
eloquence.config.enablemaximize
configuration property.
If neither is set, the default value is nonzero
(auto-maximize function
enabled).
For details, please refer to the documentation of the
eloquence.config.enablemaximize
configuration property.
Notes:
- A program may query or modify the session's auto-maximize status
using the maximize attribute.
- Requires JDLG version 1.7.2 or newer.
- enablereference : integer, get/set
- Provides the session's default value to enable or disable the
Dialog reference point
function.
Nonzero: enable the
reference point function
Zero: disable the
reference point function
If not set, it defaults to the value of the
System.enablereference
attribute or
eloquence.config.enablereference
configuration property.
If neither is set, the default value is nonzero
(reference point function
enabled).
For details, please refer to the documentation of the
eloquence.config.enablereference
configuration property.
Notes:
- A program may query or modify the session's reference point using
the referencex and
referencey attributes.
- Introduced with JDLG version 1.7.2 for attribute naming consistency
reasons. The previous referencepoint
attribute is still valid.
- enablescalefactor : integer, get/set
- Provides the session's default value to enable or disable the
Dialog auto-scale
function.
Nonzero: enable the
auto-scale function
Zero: disable the
auto-scale function
If not set, it defaults to the value of the
System.enablescalefactor
attribute or
eloquence.config.enablescalefactor
configuration property.
If neither is set, the default value is nonzero
(auto-scale function
enabled).
For details, please refer to the documentation of the
eloquence.config.enablescalefactor
configuration property.
Notes:
- A program may query or modify the session's scale factor using
the scalefactor attribute.
- Introduced with JDLG version 1.7.2 for attribute naming consistency
reasons. The previous dialogscaling
attribute is still valid.
- enablesnap : integer, get/set
- Provides the session's default value to enable or disable the
Dialog auto-snap
function.
Nonzero: enable the
auto-snap function
Zero: disable the
auto-snap function
If not set, it defaults to the value of the
System.enablesnap
attribute or
eloquence.config.enablesnap
configuration property.
If neither is set, the default value is zero
(auto-snap function
disabled).
For details, please refer to the documentation of the
eloquence.config.enablesnap
configuration property.
Notes:
- helpbaseurl : string, get/set
- Used to compose the session's help base URL, used with the
help system.
Please refer to the documentation of the
common help attribute for details.
- id : string, get
- Returns "application". The id cannot be modified.
- ipaddress : string, get
- Returns the IP address of the system where JDLG runs.
(Note: An IPv6 address is enclosed in square brackets.)
- lastnotify : string, get
- Returns the last notification value
if present, otherwise returns an empty string.
When a notification is submitted
to other sessions, a notification value
may be passed. The sessions then receive the
notification rule, the value is
available in the submitted path.
However, the path supports ASCII
characters only. DLG GET "Application.lastnotify" may be used
to correctly obtain the last notification
value even if it contains non-ASCII characters.
Note: Requires JDLG version 2.0.16 or newer.
- logoicon : string, get/set
- Specifies the default logoicon URL.
Please refer to the documentation of the
Dialog.logoicon attribute
for details.
If a relative URL is specified, the value of the
baseurl
or System.baseurl attribute
or eloquence.config.baseurl
configuration property is prepended.
If not specified, the
eloquence.config.logoicon
configuration property defines the default logoicon URL.
By default, the Eloquence logo is displayed.
- maximize : integer, get/set
- Dialog auto-maximize
status (see
enablemaximize above).
Note: Requires JDLG version 1.7.2 or newer.
- mousebutton : integer, get
- If the last rule submission is
caused by a mouse click, this can be used to query which mouse button(s)
are clicked as the sum of the values below:
1 | |
left mouse button is clicked |
2 | |
right mouse button is clicked |
4 | |
middle mouse button (mouse wheel) is clicked |
Zero is returned if the last rule
submission was not caused by a mouse click.
Note: Requires JDLG version 2.0.10 or newer.
Program example:
DLG GET "Application.mousebutton",Button
IF BINAND(Button,1) THEN
PRINT "Left mouse button is clicked."
END IF
IF BINAND(Button,2) THEN
PRINT "Right mouse button is clicked."
END IF
IF BINAND(Button,4) THEN
PRINT "Middle mouse button is clicked."
END IF
- mouseclickcount : integer, get
- If the last rule submission is
caused by a mouse click, this can be used to query the number of mouse button
clicks (1: single-click, 2: double-click).
Zero is returned if the last rule
submission was not caused by a mouse click.
Note: Requires JDLG version 2.0.10 or newer.
- mousemodkeys : integer, get
- If the last rule submission is
caused by a mouse click, this can be used to query the state of the
SHIFT/CTRL/META/ALT/ALTGR modifier keys as the sum of the values below:
1 | |
SHIFT modifier key is pressed |
2 | |
CTRL modifier key is pressed |
4 | |
META modifier key is pressed |
8 | |
ALT modifier key is pressed |
16 | |
ALTGR modifier key is pressed |
Zero is returned if the last rule
submission was not caused by a mouse click.
Note: Requires JDLG version 1.7.2 or newer.
Program example:
DLG GET "Application.mousemodkeys",Keys
IF BINAND(Keys,1) THEN
PRINT "SHIFT modifier key is pressed."
END IF
IF BINAND(Keys,2) THEN
PRINT "CTRL modifier key is pressed."
END IF
IF BINAND(Keys,4) THEN
PRINT "META modifier key is pressed."
END IF
IF BINAND(Keys,8) THEN
PRINT "ALT modifier key is pressed."
END IF
IF BINAND(Keys,16) THEN
PRINT "ALTGR modifier key is pressed."
END IF
- name : string, get
- Returns the
identifier
of the running application if it was started from the
JDLG application list,
otherwise returns an empty string.
Note: Requires JDLG version 2.0.16 or newer.
- openprinter : string, set
- The openprinter, closeprinter,
print,
printerlasterror and
printername attributes are used to
implement the Eloquence PRINTER 10 functionality.
Although they may be used from an application, they are intended to
be used internally by eloqcore.
DLG SET "Application.openprinter" opens a new print job.
The argument specifies a printer name, depending on the JDLG platform
conventions. An empty string selects the default printer.
On the Windows platform, the configuration of the JDLG printing
functionality is automatic. On Unix platforms, JDLG printing is
configured using the
eloquence.config.printcommand and
eloquence.config.defaultprinter
configuration properties.
Note: The PRINTER 10 integration was introduced with
Eloquence version B.07.10 patch PE71-0711050.
- print : string, set
- Submits the specified data to the current print job. The data is
passed through, the printer must be able to handle the data.
See also openprinter above.
- printerlasterror : string, get
- Returns additional information after a print failure.
See also openprinter above.
- printername : string, get/set
- On DLG GET, the printer name used with the current print job is returned.
On DLG SET, this specifies the printer to be used with subsequent
PRINTER 10 invocations.
The list of installed printers can be queried with
printers (see below).
See also openprinter above.
- printers : string, get
- Returns the list of installed printers. Printer names are separated
by the LF (ASCII 10) character.
On the Windows platform, the configuration of the JDLG printing
functionality is automatic. On Unix platforms, obtaining the list of
installed printers is configured using the
eloquence.config.printerscommand
and eloquence.config.printersfilter
configuration properties.
See also openprinter above.
- referencepoint : integer, get/set
- Alias for the enablereference
attribute (provided for backward compatibility).
- referencex : integer, get/set
- Horizontal reference point position in pixel units
(see enablereference above).
- referencey : integer, get/set
- Vertical reference point position in pixel units
(see enablereference above).
- scalefactor : integer, get/set (also: string, set)
- Scale factor in percent (see
enablescalefactor above).
The default value is 100, equivalent to a scale factor of 1.
A string value may be used with DLG SET to specify a decimal
scale factor, for example "0.75" = 75% (DLG GET would
then return an integer value of 75).
- snap : integer, get/set
- Dialog auto-snap
status (see enablesnap above).
The auto-snap status is nonzero when the
Dialog auto-snap function
detects that the current Dialog is snapped, encoded as the sum of the
values below:
1 | |
Dialog snapped to the
top/left edges. |
2 | |
Dialog snapped to the
bottom/left edges. |
4 | |
Dialog snapped to the
top/right edges. |
8 | |
Dialog snapped to the
bottom/right edges. |
Notes:
- snapadjustsize : integer, get/set
- Provides the session's default value to enable or disable the
Dialog auto-snap adjust size
function.
If not set, it defaults to the value of the
System.snapadjustsize
attribute or
eloquence.config.snapadjustsize
configuration property.
If neither is set, the default value is zero
(auto-snap adjust size
function disabled).
For details, please refer to the documentation of the
eloquence.config.snapadjustsize
configuration property.
Notes:
- start or start[] : string, set
- Allows to programmatically start an
application specified by its
application identifier.
This is equivalent to using the
System.start attribute, but
Application.start in addition allows to pass specific information as start
atoms to the new application.
Start atoms may be specified using the
startatom[] attribute documented below.
Notes:
- startatom[] : integer or string, get/set
- Allows to set specific start atoms which are passed to
applications started using the
start attribute.
Start atoms are stored separately from local atoms.
When an application is
started, the start atoms of the
originating session are copied to the new
application's local atoms.
A start atom can be deleted by passing an empty string.
For details about local atoms please refer to
atom[] above.
Note: Requires JDLG version 2.0.14 or newer.
- startatoms : string, get
- Returns a list of the currently stored start atom names
in alphabetical order. The atom names are separated by LF (ASCII 10).
An empty string is returned if no start atoms are stored.
See also startatom[] above.
Note: Requires JDLG version 2.0.14 or newer.
Obsolete Application attributes
The attributes listed below were documented for previous JDLG versions
and are no longer supported or should no longer be used.
- activeontop : integer, get/set
- Obsolete, no function.
Dialog layout backward compatibility
JDLG version 1.7.0 or newer allows to configure the
Dialog layout
behavior to reproduce the Dialog
window area calculation of previous JDLG versions.
For details, please refer to the
layout compatibility
section in the Dialog documentation.
- dialog_w_overlap : integer, get/set
- Provides the session's default value for the
Dialog.w_overlap
attribute.
If not set, it defaults to the value of the
System.dialog_w_overlap
attribute or
eloquence.config.dialog.w_overlap
configuration property.
If neither is set, the default value is zero.
Notes:
- Setting this to 3 should reproduce the effects of the wrong window area
calculation in JDLG versions before 1.7.0.
- Requires JDLG version 1.7.0 or newer.
- dialog_h_overlap : integer, get/set
- Provides the session's default value for the
Dialog.h_overlap
attribute.
If not set, it defaults to the value of the
System.dialog_h_overlap
attribute or
eloquence.config.dialog.h_overlap
configuration property.
If neither is set, the default value is zero.
Notes:
- Setting this to 3 should reproduce the effects of the wrong window area
calculation in JDLG versions before 1.7.0.
- Requires JDLG version 1.7.0 or newer.
- dialog_scroll : integer, get/set
- Provides the session's default value for the
Dialog.scroll
attribute.
If not set, it defaults to the value of the
System.dialog_scroll
attribute or
eloquence.config.dialog.scroll
configuration property.
If neither is set, the default value is nonzero
(Dialog scroll bars are displayed
if necessary).
Notes:
- Displaying Dialog scroll bars if necessary is new behavior introduced
with JDLG version 1.7.0.
- Requires JDLG version 1.7.0 or newer.
|
|