Question RE Returning Null or 'Data' from Hook FN

BlitzMax Forums/BlitzMax Beginners Area/Question RE Returning Null or 'Data' from Hook FN

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

IIRC i tried it as well and found the same behavior. When an event is 'in progress' it will be checked by any hook.
I used then instead a WaitEvent() loop with MyType.OnEvent handler which can easily switched during runtime.
Sometimes it worked also for me to peek the event in the queue and kill it before it reached the 'in progress' state or may kill all of them, depends on what you want to achieve:
Function KillAllPendingEvents ()
    While PollEvent()
    Wend
End Function

Did you measure a performance hit? Because 5-6 hooks with 10-30 events per second doesn't sound too heavy if nothing is done actually.