Page 1 of 1

[Done] PB 5.20 - BindEvent() doesn't work with #PB_All

Posted: Tue Aug 06, 2013 6:13 pm
by STARGĂ…TE
BindEvent() doesn't work if I use #PB_All for Window instead of the real Window-Number.

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
I know the function BindGadgetEvent(), but I need BindEvent() in combination with PostEvent()

Re: PB 5.20 - BindEvent() doesn't work with #PB_All

Posted: Tue Aug 06, 2013 8:57 pm
by eddy
confirmed - PB5.2b8 win x64

Re: PB 5.20 - BindEvent() doesn't work with #PB_All

Posted: Wed Aug 07, 2013 9:41 am
by Fred
For now, it can't be used like that, if you specify #PB_All in one field, all the following fields needs to be #PB_All as well.

Re: PB 5.20 - BindEvent() doesn't work with #PB_All

Posted: Thu Aug 13, 2015 2:57 pm
by Fred
Doc has been updated, and a runtime debugger check added to catch such errors.