Launch window on open

I was looking to have a main window automatically open a sub-window when the main window opens. I tried using the system.nav.openWindow() function, giving it an explicit path to a window in double quotes. I put this script in the internalFrameActivated event handler for the main window. I get an error when the script tries to execute.

Ideally, I’d like to have a “child” window that opens and closes with this window. The system.nav.closeWindow() function also gives me errors when I use it in the internalFrameDeactivated event handler.

Thanks for any suggestions.

Can you post the errors?

The full report is too big to post, so I’ll attach it as text.

The message says Error executing script for even internalFrameActivated on component: BlendingSetPoints.

The compact details:
Traceback (innermost last):

File “event:internalFrameActivated”, line 5, in ?


java.lang.StackOverflowError: java.lang.StackOverflowError

Ignition v7.2.5-beta3 (b63)
Java: Sun Microsystems Inc. 1.6.0_22
IgnitionError_20110322.txt (166 KB)

Well, I don’t know what your code is, however, make sure you are not closing the same window on open or opening the same window on close. Secondly, to be safe in these events wrap your code in a do later function like this:def doLater(event=event): import system some code here system.util.invokeLater(doLater)That way the code will execute after all current processing is completed. If you want to post your code feel free.

There isn’t much to it:
title = event.source.rootContainer.WindowTitle
system.tag.writeToTag("[Client]MainWindowTitle", title)

The first two lines work fine.