I have a script on a docked window's open event handler that doesn't seem to be running. The window is set to open on startup.
I have a logger set up for diagnostics as well, but none of the logging info is in the gateway status logs, which leads me to believe that the script isn't running for some reason.
logger set up in the Navigation script library:
#set up navigation logger
logger = system.util.getLogger('Navigation')
From the first line of the visionWindowOpened script on the docked window:
Navigation.logger.info('Nav Dock Opened.')
But I see no such entry in the log when I launch a client.
So I created a logger in the scope of a script library. Where would it go, or how do I get it to the gateway status log? I didn't see a case for a script executing in the client scope.
The project script library doesn't have a scope. It's just a library. The scope of anything used there is the scope of the event that calls into that library.
Vision clients log locally, visible only in their local diagnostics (via the help menu). Same with the designer. Only code that runs in the gateway itself will log to the gateway logs.
So, other than the logger not logging where expected, the script is running, but it's running too early?
The window open is supposed to fire a script that swaps to a window and updates a property on the docked window, but that property on the docked window is not updating
Yes, window open is documented to run before bindings run. It also doesn't run again if a window is cached and re-opened. it is almost never the "right" place to put anything.
Is this the window that auto-opens on project start? If so, make no window auto-open at all, and provide precise initial actions in a client startup event instead.