I have a project where I open a header, main window and a navigation strip on startup.
In my header I have several dynamic sparkline charts that display different trends for the last 24 hours. When I open a different window, the sparklines changes to some relevant trends for that specific window.
With the “internalFrameActivated” I use the following code snippet to change the tagpath to the sparkline charts:
desktop = system.gui.getCurrentDesktop()
window = system.gui.desktop(desktop).getWindow(‘Screens/Header’)
window.getRootContainer().getComponent(“Group”).getComponent(“Sparkline Chart”).tagPath = “tagpathToSomeTag”
The sparkline charts updates fine. But it seems to be some kind of timing issue by doing it like this. When I save my project and press the “Project update available”-strip, I get a script evaluation error popup explaining me that “The window “Screens/Header” is not currently open”. Despite it is set to open on startup, and is clearly already open.
Is the “internalFrameActivated” event firing before the windows are opened on startup?
Anyone knows how to avoid this error to keep showing?
Ignition version 8.0.9