PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Using CTL in panel  (Read 1046 times)

Tom Anderson

  • Silver Member
  • ***
  • Posts: 26
    • View Profile
Using CTL in panel
« on: October 25, 2022, 04:03:40 PM »
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

  • Silver Member
  • ***
  • Posts: 26
    • View Profile
Re: Using CTL in panel
« Reply #1 on: October 25, 2022, 04:09:51 PM »

Forgot to add - PVXPlus version 2019

Mike King

  • Diamond Member
  • *****
  • Posts: 3810
  • Mike King
    • View Profile
    • BBSysco Consulting
Re: Using CTL in panel
« Reply #2 on: October 25, 2022, 05:23:08 PM »
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

  • Silver Member
  • ***
  • Posts: 26
    • View Profile
Re: Using CTL in panel
« Reply #3 on: October 25, 2022, 05:38:05 PM »
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

  • Diamond Member
  • *****
  • Posts: 3810
  • Mike King
    • View Profile
    • BBSysco Consulting
Re: Using CTL in panel
« Reply #4 on: October 26, 2022, 08:52:55 AM »
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

  • Silver Member
  • ***
  • Posts: 26
    • View Profile
Re: Using CTL in panel
« Reply #5 on: October 26, 2022, 01:21:28 PM »
Mike,

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

Tom

Mike King

  • Diamond Member
  • *****
  • Posts: 3810
  • Mike King
    • View Profile
    • BBSysco Consulting
Re: Using CTL in panel
« Reply #6 on: October 26, 2022, 02:43:59 PM »
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

  • Silver Member
  • ***
  • Posts: 26
    • View Profile
Re: Using CTL in panel
« Reply #7 on: October 26, 2022, 04:00:40 PM »
PxPlus version 16
Running on Windows Server 2019
Yes, using Windx

Mike King

  • Diamond Member
  • *****
  • Posts: 3810
  • Mike King
    • View Profile
    • BBSysco Consulting
Re: Using CTL in panel
« Reply #8 on: October 31, 2022, 10:31:12 AM »
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

  • Silver Member
  • ***
  • Posts: 26
    • View Profile
Re: Using CTL in panel
« Reply #9 on: October 31, 2022, 10:37:38 AM »
Mike,

All function keys return the appropriate message.

Tom

Mike King

  • Diamond Member
  • *****
  • Posts: 3810
  • Mike King
    • View Profile
    • BBSysco Consulting
Re: Using CTL in panel
« Reply #10 on: October 31, 2022, 10:47:21 AM »
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

  • Silver Member
  • ***
  • Posts: 26
    • View Profile
Re: Using CTL in panel
« Reply #11 on: October 31, 2022, 10:54:57 AM »
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