Question
· Sep 28, 2022

Up/Down Arrow selection

In cache I am looking for a user to, from read prompt, hit control F and be able, from a list, use the up and down arrow and select an item from a list.

User would hit Control-F and then a list would pop up they can up and down arrow through and select it and it return to the read variable 

It would be similar to this.

 

 

Product version: Caché 2017.1
$ZV: 2017.1.3 (Build 317_5_19102)
Discussion (5)1
Log in or sign up to continue

Please bear with me as I only write in cache object script.  We use ontario FACS collection system, we have been writing custom scripts to do things that our end users can't in our main frame.

That screen shot I showed is our main frame going to a read prompt, then end user can hit control F and bring a menu up of "keys"  (1st node in a global)  they can up and down arrow through that list and hit enter to select one and it returns it to the read prompt.

I want to be able to accomplish this.  

- At a read prompt, a user can hit Control-F, a list of items pops up they can select from.  
- The end user can use the up and down arrows to find the "key" hit enter and it populates that key to the "read variable" and moves on.

Usually, when using old VT100 sessions (CHUI) then there is a "main" function that can handle all special chars (e.g. PF1-4, ESC, HOME, CTRL-F) in one central place that is being called from all screens.

I would recommend using the following a technique:
Read *a Set zb=$zb,key=$key
Then, you may examine those variables zb and key to capture special keys.