Calling window function from outside window

what’s the best/common way to call a function from another window?
window-1 should call a function of window-2 to which collects some global data created in window-1
how can I do it ?

Try This…


windows2.command(parameter1, parameter2)
windows2.showmodal()

on windows2

variable1 = windows1.variable
variable2 = windows2.variable

[quote=106929:@Johann JFK]what’s the best/common way to call a function from another window?
window-1 should call a function of window-2 to which collects some global data created in window-1
how can I do it ?[/quote]

window-2.myfunction()

But you must know that if window-2 is not open when you make the call and it is set as implicit instance True it will open. So you may need to precede your call with window-2.visible = false and follow it with window-2.close to prevent window-2 from appearing.

ok guys, works perfectly for me

thanks