not using waitevent

BlitzMax Forums/MaxGUI Module/not using waitevent

Nate the Great(Posted 2010) [#1]
hi,

Im just about to get max gui, hopefully tonight if parents will get home in time :) and well I was playin with the demo and I wanted to have an app that would update in the background say 60 times a second while only jumping to check the gui if there was an event... like this
psuedo code

repeat
do this stuff all the time over and over
if eventhappened()
do gui stuff
endif
forever


SebHoll(Posted 2010) [#2]
Your options are to either stick with WaitEvent() but use CreateTimer() to create a timer event every 1/60th of a second, or to use the non-blocking PollEvent() command.


Nate the Great(Posted 2010) [#3]
thanks sebholl! exactly what I was looking for


JoshK(Posted 2010) [#4]
While PeekEvent()
WaitEvent()
Wend