I am trying to trigger an event on an open window when another window is being closed. I am trying to use the IsValid() function but it returns False indicating the window is not open - even though it is open and I have confirmed via Objects in Memory.
boolean lb_window_open
// see if window1 is open
lb_window_open = IsValid(w_window1)
IF (lb_window_open = TRUE) THEN
// trigger window 1 retrieve to refresh data
w_window1.PostEvent("ue_retrieve")
ENDIF
NOTE: The window is opened via the following code:
window lw_frame
w_window1 lw_sheet
lw_frame = of_getmdiframe()
OpenSheet(lw_sheet,lw_frame,0,Layered!)
QUESTION:
Does anyone have any ideas why my window is not being detected as open? I have also trued checking the Handle but that returns null.
I appreciate any info/suggestions.
- Bill
--------------------------
PowerBuilder 11.0
boolean lb_window_open
// see if window1 is open
lb_window_open = IsValid(w_window1)
IF (lb_window_open = TRUE) THEN
// trigger window 1 retrieve to refresh data
w_window1.PostEvent("ue_retrieve")
ENDIF
NOTE: The window is opened via the following code:
window lw_frame
w_window1 lw_sheet
lw_frame = of_getmdiframe()
OpenSheet(lw_sheet,lw_frame,0,Layered!)
QUESTION:
Does anyone have any ideas why my window is not being detected as open? I have also trued checking the Handle but that returns null.
I appreciate any info/suggestions.
- Bill
--------------------------
PowerBuilder 11.0