We are converting some code in a legacy application and, in its simplest form, want to know that a mouse has been used/clicked rather than ENTER pressed. We are not that familiar with the MOUBTN keyword, which we assume will tell us what we want, and are having trouble getting this to work. Though we've looked through other questions regarding MOUBTN, we obviously haven't found the solution.
In the DSPF, at the file level, MOUBTN has been defined as: MOUBTN(*ULD CF09).
In the corresponding RPG program, the following has been coded:
FFMPKDKAVCF E WORKSTN
F KINFDS IOAREA
IIOAREA DS
I 369 369 @AIDKD
C *INKI IFEQ *ON
C EXSR
C ENDIF
We must be missing something since INKI never gets set on when the mouse is used. We have also tried using event indicators (E09), and then comparing @AIDKD to x'79', but failed with this as well.
Would appreciate help in getting this to work.
Thanks.
Zack
Software/Hardware used:
AS400
ASKED:
January 17, 2013 2:58 PM
Correction to ‘Answer’: *ULD is Unshifted Left Double-click. — Tom
Wiki – thank you for your response. According to the documentation, *ULD means “unshifted (not upper shift) left button double click” where we understand that “unshifted” means no use of the shift button. In any case, we’ve tried both cases – pressing the shift button and not pressing it – and the results are the same. CF09/INKI is not turned on. As for VLDCMDKEY, this would indeed tell us that ENTER was not pressed but it wouldn’t indicate that the mouse was used rather than a command key. We could, I suppose, if the indicator for VLDCMDKEY was ON and assuming that the mouse is considered to be a command key, check for all valid command keys (F1-F24) and if no command key was pressed then assume that the mouse was double-clicked. This solution, if it works, is not explicit and leaves open room for error so getting MOUBTN to work is preferable.
To reiterate, what we want is to know that on a particular display field the mouse was double-clicked in order to open and display a particular window.
We have checked the VLDCMDKEY indicator with double-click on the mouse and the indicator is not turned on. So even the solution I supposed we could use won’t work.
What emulator is used? What version? If it’s iSeries Access, what is its service level? — Tom
Tom, we have discovered that the problem indeed appears to be with the emulator (BOSaNova) since we have tested the same process through Client Access and with that there is no problem. We have referred the problem to BOS and await their reply.
First testing of system interfaces should be done through products that are integrated with the system. That helps tell you if you’re doing it right or if the feature needs a PTF or similar things. Once you know it’s done right, then expend to 3rd-party products. — Tom