I stumbled across some strange behavior yesterday. Perhaps somebody can enlighten me...
All completely standard code, generated from appbuilder/ui designer. OE 11.5 & 11.7
I have a form(cls) with a button. The button opens a window (.w). Now, if the .w opens another window and I close that one, weird things happen to the focus.
a) the .w is closed with "escape/endkey", everything behaves normally
b) the .w is closed with the x in the menu bar (window-close), the focus is no longer on the window I return to. In fact, the focus seems to be completely gone.
Does anybody have an idea why this happens? It does not happen if we're working with only windows and no forms. So it seems there's a problem related to the combination of AblForms & the close-window from .w's.
Edit: attached an example. If you start from the form, there'll be problems. If you start the .w, there won't.
I tried to reproduce the issue but I'm not seeing the behavior you described. Can you create a stripped-down example I could test with?
One thing that seems odd is that you're able to close the windows with the escape key. Are you running the windows PERSISTENT? If so, I don't think the escape key should close them. You should be running them persistent to avoid multiple WAIT-FORs.
I've added an example. Indeed, the windows should be run persistent, but in this case the behavior stays the same. If you run a window persistent, it's end-key code is different and won't cause a close.
I still don't see the behavior. I run the form and click on the button on the form. A window appears. I click on the button in the window and another window appears. When I close this second window, either by hitting Escape or by clicking the window's close (X) button, the second window goes away and focus returns to the first window. Focus in the first window is on the button since that's where I last clicked. The button doesn't show a focus rectangle initially but if I press the Alt key the focus rectangle appears.
Do you have any non-standard settings in the Startup section of the registry or progress.ini? Are you using any startup parameters which could affect the behavior?
Thanks for testing. It's strange, but also good that you have a correct behavior. It means something is wrong with my installation(s). When I close the second window, I can see the button has focus (blue border), but I don't have access to the window unless I click on it with the mouse. As far as I know, I have no special parameters. Just standard Openedge. Tested on 11.5 & 11.7, on windows 10 & 2012
I tested on Windows 8.1. I'll try it on Windows 10 later today.
I ran your example from the Procedure editor. I'll try running it in PDS but I don't think that should make a difference.
I tried both pds en proc editor. Both the same results
I tried it on Windows 10 and I still didn't see the behavior.
May I ask what version you're using?
I just tested on a 11.3 installation, and it doesn't have the problem.
It's a different computer though, so probably more differences than just the OE version
I tried 11.7.1, 11.7.3, and 12.0.