I am running Vision version 8.3.6
I’m having some unexplained behavior regarding closing popups. Closing the popup through a button causes the main window to swap back to my overview [home screen].
This persists through the built-in navigation selection in scripting and manually writing out the system.vision.closeWindow("Popups/NAME") command.
This does NOT happen whenever I use the event handler for loss of focus on the popup with the same script.
The resolution was to set the popup to be on the same layer as the main windows.
While I have found a workaround, it leaves me with more questions than before. I’ve included as much detail as I could below, in case it’s helpful…probably a bit overkill, but you never know what may be helpful.
My questions are why this behavior happens without having identical layers, and why it would happen only from the button and not from the loss of focus? I’m at a complete loss.
I suppose a followup question would be what are the downsides of having the popups on the same layer as the windows?
- The structure of the screen is a docked navigation tab strip at the top, a docked info bar at the bottom, and swapping main windows in the middle. (Reference image below.)
- All main windows have a cache policy of Always.
- All main windows have a Layer of 1
- All Popups have a Layer of 2
- Overview screen is a main screen that is only distinctive as being the only main window opened on startup.
- Settings screen is simply putting a name to it so I’m not saying “the other main window” every time. Behavior is the same from any main window.
- The behavior was persistent across all popups and all main windows.
- Popups were tested being closed with three methods:
- A button’s actionPerformed event handler using the code system.vision.closeWindow("Popups/BURNER_START_RESET")
- Both default buttons and momentary buttons were tested for both methods.
- A button’s actionPerformed event handler using the “Close” radio button under the Navigation tab of the scripting window.
*The popup window’s internalFrameDeactivated event handler using the “Close” radio button on the Navigation tab
- A button’s actionPerformed event handler using the code system.vision.closeWindow("Popups/BURNER_START_RESET")
- The popup window was tested on layers 1-5.
- The behavior persisted on all except 1.
- The popup being tested had all bindings and scripting removed except for what was needed for testing. All components except for the buttons to test were also removed.
Screen Layout:
Popup window properties:
Overview Window properties:
Settings window properties:
I feel like I'm forgetting to include something. I'll update with more details if I think of anything else that might be relevant.
Thanks in advance for any help or ideas! This one's got me thoroughly stumped.



