Obscure visionOpenedWindow launches root container script can't import system

I have a root container script in a popup window that refreshes the values on the page from a database. The script works fine from a button on the page, but when I call it from visionOpenedWindow, it fails the first time the window is opened, but not after that. So, if I open it, error pops up, then I close it. Every time I open it after that, the script works fine. Below is the visionOpenedWindow script and root container script. The error that is returned is “common.script.Imm object has no attribute ‘db’”. Note that I also tried system.tag.readBlocking and had the same error (except ‘tag’ instead of ‘db’). I have a workaround by copying the root container script directly into the visionOpenedWindow script and it works fine. The only issue with that solution is that when I change the UpdateParameters script I’ll have to maintain the changes in two places.

visionOpenedWindow script:

system.gui.getParentWindow(event).getComponentForPath(‘Root Container’).UpdateParameters()

Root Container Script:

def UpdateParameters():
import system
Parameters = system.db.runQuery(“Select * from Table”, “database”)

Where you are running the script from visionOpenedWindow, does your updateParameters routine need any binding to of run before it can function? Personally I rarely use visionOpenedWindow because bindings don’t run until after it. I’d run it from your root container as a property change script. I believe the property change you would look for is componentRunning but you would wan to do a print to make sure that is right. Running it there your bindings will of loaded if you need any but it will only run when your window is first opened.

This is actually a known bug that is being fixed as part of the 8.0.8 release and is already in the nightly builds if you’d like to test it out.

Good to know this is being fixed. Any idea when 8.08 will be released? We’re going to be doing QA testing on the software soon, at which point I’ll have to lock down the versions until we do an upgrade.

Since the RC was released on Monday, we’d target ~2 weeks from that to a regular release. So should be right in the middle of February.