Using CTL in panel

Started by Tom Anderson, October 25, 2022, 04:03:40 PM

Previous topic - Next topic

Tom Anderson

I have a Nomads panel with a multiline control. I am wanting the user to hit a specific function key (F1 - F12) to perform a specific task.
When I hit the F key nothing happens except that the cursor moves to next panel control. If I break out of the program and from prompt enter ? CTL - every F key returns a value of -1001.
On the panel under then CTLS option, I have defined say F10 with a CTL value of 10 and the Process as 'Perform' ";do_task". But task is not done.

How can I get the F keys to return what I need?

Any help greatly appreciated!!

Tom

Tom Anderson


Forgot to add - PVXPlus version 2019

Mike King

Perhaps your Function key definition table is not setup correctly.

Try running the following from PxPlus command mode (Press all Fx keys in order followed by ESCAPE)

-:list
0010 WHILE 1
0020 INPUT (0)"Hit FKey:",'BI',x$,'EI'
0030 PRINT "CTL=",CTL," EOM=$",HTA(EOM),"$"
0040 IF EOM=ESC THEN BREAK
0050 WEND

-:run
Hit FKey:
CTL= 1 EOM=$000070$
Hit FKey:
CTL= 2 EOM=$000071$
Hit FKey:
CTL= 3 EOM=$000072$
Hit FKey:
CTL= 4 EOM=$000073$
Hit FKey:
CTL=-1 EOM=$000074$
Hit FKey:
CTL= 6 EOM=$000075$
Hit FKey:
CTL= 7 EOM=$000076$
Hit FKey:
CTL= 8 EOM=$000077$
Hit FKey:
CTL= 9 EOM=$000078$
Hit FKey:
CTL= 10 EOM=$000079$
Hit FKey:
CTL= 11 EOM=$00007A$
Hit FKey:
CTL= 12 EOM=$00007B$
Hit FKey:
CTL= 4 EOM=$1B$
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

Tom Anderson

Mike,

Here's what I got:

Hit FKey:
CTL= 1 EOM=$000070$
Hit FKey:
CTL= 2 EOM=$000071$
Hit FKey:
CTL= 3 EOM=$000072$
Hit FKey:
CTL= 4 EOM=$000073$
Hit FKey:
CTL=-1 EOM=$000074$
Hit FKey:
CTL= 6 EOM=$000075$
Hit FKey:
CTL= 7 EOM=$000076$
Hit FKey:
CTL= 8 EOM=$000077$
Hit FKey:
CTL= 9 EOM=$000078$
Hit FKey:
CTL= 10 EOM=$000079$
Hit FKey:
CTL= 11 EOM=$00007A$
Hit FKey:
CTL= 12 EOM=$00007B$

Tom

Mike King

Tom, these look correct.

Try using a different Fkey such as F8 of F9.   Try setting the User CTL on the panel for F8 to EXECUTE "MSGBOX DAY" and see if the date appears when press F8 on the panel.
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

Tom Anderson

Mike,

MSGBOX DAY does not work. The session completely locks up.

Tom

Mike King

Something really odd here. 

What version PxPlus are you using and on what Platform? 
Are you using WindX?
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

Tom Anderson

PxPlus version 16
Running on Windows Server 2019
Yes, using Windx

Mike King

Tom,

I have attached a small test Nomads screen library (4tom.en) with a panel called "test".

In the panel there is an input field and I set six FKeys to display message boxes (F1, F2, F3, F8, F9, and F10).

They work for me here, can you let me know if they work for you?
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

Tom Anderson

Mike,

All function keys return the appropriate message.

Tom

Mike King

Given that I'm not certain why your input field would not be working.

Is it possible you have overridden the function key definitions in your application somewhere using DEFCTL or the 'FL' mnemonics?

You may want to open a support ticket on this issue.  They may be able to help you.  Likely they would want a copy of the nomads panel/library you are using to confirm the settings.
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

Tom Anderson

Mike,

I don't remember anywhere in the app using DEFCTL or 'FL'.

I'll open a support ticket and see where we go on this.

Thanks for your help!

Tom