Events & FlushEvents

BlitzPlus Forums/BlitzPlus Programming/Events & FlushEvents

Cold Harbour(Posted 2004) [#1]
Hi can anyone help me please? Why do I keep seeing $203 events generated when I move the mouse over the canvas. Shouldn’t they be being flushed?

Thanks!

Global window=CreateWindow( "Window",50,50,300,300,main,15)

canvas=CreateCanvas(10,10,100,100,window)

While WaitEvent()<>$803

	If EventID()=$203 And EventSource()=canvas
	
		FlushEvents $203
					
	EndIf	

	If EventID()=$203 And EventSource()=canvas
		
		DebugLog Hex(EventID())
	
	EndIf
	
Wend

End



CS_TBL(Posted 2004) [#2]
I'd say that at the first 'If' all events are flushed..

..and after that you'll simply have new events again ..

I don't find that illogical ..


Cold Harbour(Posted 2004) [#3]
Right, I understand. I thought, for some reason, that events were only polled at waitevent commands. Don’t ask me why I thought that.

Thanks cs-tbl.