[Done] PB 5.20 - BindEvent() doesn't work with #PB_All
Posted: Tue Aug 06, 2013 6:13 pm
BindEvent() doesn't work if I use #PB_All for Window instead of the real Window-Number.
I know the function BindGadgetEvent(), but I need BindEvent() in combination with PostEvent()
Code: Select all
Enumeration
#Window
#Gadget
EndEnumeration
Procedure Test()
Debug "Test"
EndProcedure
BindEvent(#PB_Event_Gadget, @Test(), #PB_All, #Gadget)
;BindEvent(#PB_Event_Gadget, @Test(), #Window, #Gadget)
OpenWindow(#Window, 0, 0, 800, 600, "WindowTitle", #PB_Window_MinimizeGadget|#PB_Window_ScreenCentered)
CanvasGadget(#Gadget, 20, 20, 200, 200)
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
End
EndSelect
ForEver