When you have created an event hook say for scrolling a canvas so it updates realtime. Do you need to place all your other event handling inside this hook function or can you still have a waitevent() loop?
I have tried this and the event structure in the while waitevent() loop does not seem to get executed but the hook function does.
If my understanding is correct, the hook function is called when an event is generated and then when it exits control is passed back to waitevent?
As I write this I'm beginning to realise that the item in the event queue may have been removed due to the hook so the waitevent loop never gets the event. so using peekevent in the hook would negate this to check if it is an event you need and if it is to remove it from the queue using currentevent?
Am i on the right tracks here?
Cheers.
I have tried this and the event structure in the while waitevent() loop does not seem to get executed but the hook function does.
If my understanding is correct, the hook function is called when an event is generated and then when it exits control is passed back to waitevent?
As I write this I'm beginning to realise that the item in the event queue may have been removed due to the hook so the waitevent loop never gets the event. so using peekevent in the hook would negate this to check if it is an event you need and if it is to remove it from the queue using currentevent?
Am i on the right tracks here?
Cheers.