Dynamically find base window
- New
- How-to
-
Amit Sharma
- PowerBuilder
- Friday, 14 November 2025 03:54 AM UTC
Sorry if this is already asked or answered already but I couldn't find an answer. Here is the situation
w_main MDI
then 2 base windows say w_base and w_base1
I inherited 2 working windows out of these so
w_order inherited from w_base
w_billing inherited from w_base1
in w_main I am using smallbuttonclicked event ue_close where I want to call function depending on active base window. Assume I opened w_order and click CLOSE menu.
w_base have function defined fw_close for closing the window
w_base1 have function fw_terminate for same closure.
I would like to code w_main.ue_close in such a manner that I can call window functions based on which base is active, example
w_base lw_base
w_base1 lw_base1
if (not sure what condition) then //this is where I am struggling
lw_base = w_main.getactivesheet()
lw_base.fw_close()
else
lw_base1 = w_main.getactivesheet()
lw_base1.fw_terminate()
end if
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.