Hello, I’m having a problem with the method getWindow().
I have extended a Window class, which has its layout and a couple of buttons. I use it as a sub-window.
My problem is that when I use the function getWindow() on one of the buttons, it returns the main window instead of the sub-window.
This script is called in the constructor of the sub-window, and mainWindow is a reference to the mainWindow.
The only notification that appears is the MAIN one.
if ( button.getWindow() == mainWindow)
mainWindow.showNotification("MAIN");
if ( button.getWindow() == this )
mainWindow.showNotification("SUB");
Is this right? I don’t think this is the intended behaviour. Am I missing something?