PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Unexpected Preinput on Panel Exit  (Read 1018 times)

James Zukowski

  • Diamond Member
  • *****
  • Posts: 297
    • View Profile
Unexpected Preinput on Panel Exit
« on: May 04, 2023, 05:09:53 PM »
We're running a character-based menu system that will run an existing CUI program or PROCESS a NOMADS panel, based on file parameters. I've created a new NOMADS F/M and when I exit by clicking the appropriate button, all is well. However, when I use the Alt-X hotkey I have set up for the Exit button, I get unexpected characters in the menu program's typeahead buffer.

We have other panels that are PROCESSed off the menu without incident, but this one, for some reason, works differently. (We're not using the NOMADS Security processing.) It's a panel with a few controls, a TitleBar, an embedded panel, and a folder on it. We have 2 options: Full Access and Inquiry Only, based on a file-based permissions list. The menu starts the Full Access version with 7 tabs on the folder, but if the user is identified as Inquiry Only, part of our Pre-Display routine PROCESSes a 3-tab version and exits with Cmd_Str$="END". While it doesn't seem to make any sense that there would be a difference, the 7-tab Full Access version drops "BN" into the input buffer, while the 3-tab version drops "BL" in. If I include a PRINT 'CI', in the Exit button's logic, the characters don't show up.

Any insights would be appreciated!

We're running PxPlus v15.10 on Linux RedHat with WindX on Windows 10 Pro workstations.
James Zukowski
Sr. Developer - J&E

BRAND>SAFWAY
Brand Industrial Services

Mike King

  • Diamond Member
  • *****
  • Posts: 3811
  • Mike King
    • View Profile
    • BBSysco Consulting
Re: Unexpected Preinput on Panel Exit
« Reply #1 on: May 04, 2023, 05:20:38 PM »
Perhaps the control you are on has an signal on Exit option enabled and the ALT-X (which I suspect triggers an eXit button) closes the panel thus triggering the On Exit event which effectively places the codes for the  event into the imput buffer
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

James Zukowski

  • Diamond Member
  • *****
  • Posts: 297
    • View Profile
Re: Unexpected Preinput on Panel Exit
« Reply #2 on: May 05, 2023, 09:33:29 AM »
Mike,

Thanks for the quick response. I just re-checked, and no, there are no extra Signal Attributes assigned.

This is part of the standard embedded panel we've set up with the navigation and action buttons to replace the standard NOMADS button set. It works fine on all the other panels it's embedded on, which makes this even stranger, since there's a multi-tab folder on at least one of those.

The Button Pressed logic for the E&xit is:
Execute: Perform Default_Prog$+";Check_changes";cmd_str$="END"
James Zukowski
Sr. Developer - J&E

BRAND>SAFWAY
Brand Industrial Services

James Zukowski

  • Diamond Member
  • *****
  • Posts: 297
    • View Profile
Re: Unexpected Preinput on Panel Exit
« Reply #3 on: May 08, 2023, 02:13:04 PM »
The strange has just gotten a bit stranger...

No changes to the panel or programming, just a change in the calender from the first week of May to the second. The preinput characters changed from "BN" to "'&" and "BL" to "'$".

I specifically tested the Alt-X on a field that had no attached logic or attributes other than "Tab Stop". Using Alt-X loads the characters into the input buffer, but clicking the Exit button itself does not.

Anyone with any insights on this?
James Zukowski
Sr. Developer - J&E

BRAND>SAFWAY
Brand Industrial Services

Loren Doornek

  • Gold Member
  • ****
  • Posts: 85
    • View Profile
Re: Unexpected Preinput on Panel Exit
« Reply #4 on: May 08, 2023, 03:32:46 PM »
Try changing the hot key to another letter (like "E") and see if the behavior changes.  Also try assigning the ALT-X hotkey to a different button, and see if the problem persists.  That should tell you if it's a problem with the specific control or something else.  It's a long shopt, but possibly someone defined a $CTL function to that hot-key combination somehow.

James Zukowski

  • Diamond Member
  • *****
  • Posts: 297
    • View Profile
Re: Unexpected Preinput on Panel Exit
« Reply #5 on: May 08, 2023, 04:50:30 PM »
Thanks, Loren. That wasn't exactly the problem, but it was close enough to find it.

I had our standard Exit button defined with "X" as the hotkey. I also defined a menu entry for Exit with the "X" hotkey. Changing the menu entry from E&xit to &Quit resolved the problem.
James Zukowski
Sr. Developer - J&E

BRAND>SAFWAY
Brand Industrial Services

Loren Doornek

  • Gold Member
  • ****
  • Posts: 85
    • View Profile
Re: Unexpected Preinput on Panel Exit
« Reply #6 on: May 08, 2023, 05:18:17 PM »
Ah-ha!  Glad you found it.  It all makes perfect sense now :-)