To use the poptext object, minor changes are necessary concerning the defaults dialog files (defaults.eq, eqdef.mod, eqbind.mod, eqbind.if). These changes are already integrated into the current dialog files which are delivered with HP Eloquence A.06.20:
default poptext { .visible true; .font NormalFont; .width 40; .posraster true; .sizeraster true; integer EqRule := 0; integer EqActiveline := 0; .function EqListBoxCB; .bgc ColWin; .fgc ColBlack; }
export default poptext { .visible true; .font NormalFont; .width 40; .posraster true; .sizeraster true; integer EqRule := 0; integer EqActiveline := 0; .function EqListBoxCB; .bgc ColWin; .fgc ColBlack; }
// poptext: selected line has changed on POPTEXT select { this.EqActiveline := this.activeitem; if( this.EqRule ) then EqExitEventLoop( this, this.EqRule ); endif }
function callback EqListBoxCB() for select, dbselect;
export function callback EqListBoxCB() for select, dbselect;
function callback EqListBoxCB() for select, dbselect;
Normally, POPUP BOX will be centered to the most recent DLG DO window. If this is not available or invisible, POPUP BOX will be centered to the screen.
You can also use the genuine position found in the defaults dialog file (where the EqPopup object is defined). The genuine x coordinate will be used if x<0, the genuine y coordinate will be used if y<0. Thus, the statement 'POPUP BOX -1,-1,...' will use the genuine position.
The POPUP BOX now supports automatic position saving and restoring. This enables you to specify a x/y position for the box, either by specifying .xleft and .ytop in the EqPopup object definition or with DLG SET EqPopup.x/.y. If you afterwards execute the statement 'POPUP BOX -1,-1,...', the box will always appear at the specified position, no matter if the user moves it on the screen.
In order to enable this, minor changes are necessary concerning the defaults dialog files (defaults.eq, eqbind.mod, eqbind.if, eqpopup.mod). These changes are already integrated into the current dialog files which are delivered with HP Eloquence A.06.20 (the lines you should insert are marked with '>>>'):
function boolean EqCallBack( string, object, integer ); >>> function void EqRestorePopup();
export function boolean EqCallBack( string, object, integer ); >>> export function void EqRestorePopup();
function boolean EqCallBack(string input, object input, ... >>> >>> function void EqRestorePopup();
on EqPopup.EqPB1 select, key EqKbCR { EqPopup.visible := false; updatescreen(); >>> EqRestorePopup(); EqExitEventLoop( this, 1 ); }Do the same with the EqPB2 ... EqPB5 rules.
With HP Eloquence, a sample program is included named "CANCEL.PROG" (in the share/example directory) which demonstrates the usage of the .do attribute.
The Cancel dialog is contained in the "cancel.idm" file, which must be slightly changed in order to work correctly even if another dialog is visible. The line containing '.dialogbox false' must be deleted (it is marked with '>>>'):
window CancelDlg { ... >>> .dialogbox false; <<< delete this lineThis change has already been applied to the current "cancel.idm" example file which is delivered with HP Eloquence A.06.20.
When requesting a native attribute which delivers an object identifier, e.g. DLG GET "Object!parent", the corresponding object path should be delivered. This did not work correctly in former releases and has been fixed now.
To set the DDE acknowledge timeout, execute a statement like below:
CALL DLL Run("RunSrv", hostname$, "DDE .TIMEOUT 30000", Errn, Msg$)The "DDE .TIMEOUT 30000" specifies a 30000 milliseconds (30 seconds) timeout interval. A timeout value of -1 will disable the timeout detection, causing the RUNSRV(32) to wait infinitely for the transaction to complete.
If you omit the timeout value ("DDE .TIMEOUT") the DDE acknowledge timeout will be reset to its default of 10 seconds.
Due to a 16 bit Windows limitation, the maximum timeout value for the 16 bit RUNSRV is 65534 milliseconds. If you need a longer timeout interval, the only choice you have is a value of -1 (infinite). This limitation does not apply to the 32 bit RUNSRV32.
Please note that the default DDE acknowledge timeout (10 seconds) will normally be sufficient. The timeout should only be modified temporarily and restored to the default after the specific transaction has finished. For example:
! Set DDE acknowledge timeout to 60 seconds CALL DLL Run("RunSrv", hostname$, "DDE .TIMEOUT 60000", Errn, Msg$) ! Perform lengthy transaction ... ! Reset DDE acknowledge timeout to default CALL DLL Run("RunSrv", hostname$, "DDE .TIMEOUT", Errn, Msg$)