Expand/Shrink

gdx

Definition: include xpGUI.e

gdx identifier [= gDialog/gTreeView/...(...)]
Description: Type. A non-negative integer, being 0/NULL or an integer index into the private control tables of xpGUI, or a flat sequence of them (which may sometimes contain embedded nulls).

Use this to define interface element variables. It is probably unwise to use this to determine whether an object is in fact such, as many things which are clearly not (eg 0, 1, '2', {3,4,5}, {'6'}) may pass, the latter only when 54(==#36=='6') or more interface elements have been defined, it does however check [each element] is a non-negative integer between zero (inclusive) and the current control table length. Some uses of a gdx may prohibit [embedded] nulls, but it is never an inherent error for a variable declared as type gdx to hold such.
pwa/p2js: Supported, or at least understood by pwa/p2js and mapped to "let /*gdx*/" aka (almost) completely ignored, since JavaScript is a typeless language. As per unwise, xpGUI.js does not even have a fake version, which you should not ever want anyway.
Note that on desktop/Phix a gdx is an integer (index to private tables) whereas in JavaScript it is in fact the HtmlElement.
Therefore, an application should refrain from printing, comparing (etc) gdx variables, except perhaps during initial debugging.
[Equality tests and find() are in fact fine, but gdxvar1 < gdxvar2 and similar are potentially problematical.]
Example:
include xpGUI.e

gdx quit_bt = gButton("Quit")
See Also: gButton
Expand/Shrink