This is not an issue, just wondering why, if you compile and run the following code from the IDE, note if press Button_0 and then press Button_1 and look at the Dubug Results. Close the program and run it again, the results of Button_0 is not te same. Just wondering why?
Thanks
Code: Select all
Procedure OpenWindow_0(x = 0, y = 0, width = 600, height = 400)
Window_0 = OpenWindow(#PB_Any, x, y, width, height, "", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget)
Button_0 = ButtonGadget(#PB_Any, 240, 190, 100, 25, "Button_0", #PB_Button_Left)
Button_1 = ButtonGadget(2, 240, 220, 100, 25, "Button_1", #PB_Button_Left) ; <<<<<<<<<<<<<< NOTE, no #PB_Any "
EndProcedure
Procedure Window_0_Events(event)
Select event
Case #PB_Event_CloseWindow
ProcedureReturn #False
Case #PB_Event_Menu
Select EventMenu()
EndSelect
Case #PB_Event_Gadget
Select EventGadget()
EndSelect
EndSelect
ProcedureReturn #True
EndProcedure
OpenWindow_0()
Repeat
event = WaitWindowEvent()
If EventGadget() <> 0
Debug EventGadget()
Else
EndIf
Until Window_0_Events(event) = #False
End
