This little tester will will demonstrate it. Move that window around and note str(elapsedMilliseconds() quits updating until the mouse is released.
(And please don't fuss at the coding... It is a piece of one of my little testers that I used to learn how particular aspects of PureBasic works.)
Anyhow, is this an expected behavior and is there any way around it?
Code: Select all
global.i id10 = 10
global.i id14 = 14
global.i id15 = 15
id10 = openWindow ( #pb_any, 0, 0, 300, 300, "Base window" )
id14 = buttonGadget ( #pb_any, 0, 50, 150, 50, "Close all" )
id15 = textGadget ( #pb_any, 0, 100, 300, 50, "Zero" )
repeat
event.i = windowEvent ( )
if event = #pb_event_gadget
if eventGadget ( ) = id14
closeWindow ( id10 )
break
endIf
elseif event = #pb_event_closeWindow
if eventWindow ( ) = id10
closeWindow ( id10 )
break
endIf
endIf
setGadgetText ( id15, str(elapsedMilliseconds()) )
delay ( 10 )
forever