250 pts.
 How to implement MOUBTN using RPG III/RPG400
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

Answer Wiki:
MOUBTN(*ULD CF09. Is upper shift left button double press. Make sure you are pressing the correct combination to create the proper event. Check the valid command key VLDCMDKEY keyword. You can have an indicator on when any command key was pressed. Indicator OFF? Enter was presses Good luck
Last Wiki Answer Submitted:  January 19, 2013  12:49 pm  by  PGMBOB   695 pts.
All Answer Wiki Contributors:  PGMBOB   695 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Correction to ‘Answer’: *ULD is Unshifted Left Double-click. — Tom

 107,845 pts.

 

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.

 250 pts.

 

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.

 250 pts.

 

What emulator is used? What version? If it’s iSeries Access, what is its service level? — Tom

 107,845 pts.

 

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.

 250 pts.

 

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

 107,845 pts.