I have three views which shall be shown side by side after pressing a button in a calling view. Window2 is the central of these three so that one is activated with the button and the other two are then activated from Windows2. This works fine the first time the button is pressed. The three views are closed if Windows2 is closed. This also works.
However, the second and further times the view showing button is pressed, only two of the views are displayed. Why is it so and can it be fixed? I even put a button om Windows2 to activate Window1, but that doesn't work either.
Below are my simplified views:
Code:
//Firstpage
Use Windows.pkg
Use DFClient.pkg
Use DFEntry.pkg
Use Window2.vw
Deferred_View Activate_oFirstpage for ;
Object oFirstpage is a dbView
Set Border_Style to Border_Thick
Set Size to 116 142
Set Location to 2 2
Set Label to "Firstpage"
Object oButton1 is a Button
Set Location to 35 26
Set Label to 'Show views'
Procedure OnClick
Handle hVsynk
Get DoRunVaxtSynk of oWindow2 to hVsynk
End_Procedure
End_Object
Cd_End_Object
//Window1
Use DFClient.pkg
Use DFEntry.pkg
Use Windows.pkg
Activate_View Activate_oWindow1 for oWindow1
Object oWindow1 is a dbView
Set Location to 3 167
Set Size to 126 158
Set Label to "Window1"
Set Border_Style to Border_Thick
Object oButton1 is a Button
Set Location to 39 61
Set Label to 'oButton1'
Procedure OnClick
End_Procedure
End_Object
End_Object
Window2
Use Windows.pkg
Use DFClient.pkg
Use DFEntry.pkg
Use Window1.vw
Use Window3.vw
Activate_View Activate_oWindow2 for oWindow2
Object oWindow2 is a dbView
Set Border_Style to Border_Thick
Set Size to 141 144
Set Location to 4 288
Set Label to "Window2"
Object oButton1 is a Button
Set Location to 88 55
Set Label to 'Show view 1'
Procedure OnClick
Send Activate_oWindow1
End_Procedure
End_Object
// Procedure Activating
// Forward Send Activating
// Send Activate_oWindow3
// Send Activate_oWindow1
// End_Procedure
Procedure Closing_View
Send Close_Panel of oWindow3
Send Close_Panel of oWindow1
Forward Send Closing_View
End_Procedure
Function DoRunVaxtSynk Returns Handle
Handle hVSynk
Send Activate_oWindow1
Send Activate_oWindow3
Send Activate_oWindow2
Get oWindow2 to hVSynk
Function_Return hVSynk
End_Function
End_Object
//Window3
Use DFClient.pkg
Use DFEntry.pkg
Use Windows.pkg
Activate_View Activate_oWindow3 for oWindow3
Object oWindow3 is a dbView
Set Location to 0 457
Set Size to 113 154
Set Label to "Window 3"
Set Border_Style to Border_Thick
Object oButton1 is a Button
Set Location to 57 94
Set Label to 'oButton1'
Procedure OnClick
End_Procedure
End_Object
End_Object