Slider/MouseDown: Is it a bug??
BlitzPlus Forums/BlitzPlus Programming/Slider/MouseDown: Is it a bug??
| ||
The loop While-Wend will be infinite if you first click on the left or right of the slider then somewhere inside the window.
win=CreateWindow("",0,0,640,480,0,3)
can=CreateCanvas(0,0,640,480,win)
SetBuffer CanvasBuffer(can)
sld=CreateSlider(100,100,200,30,can,1)
Repeat
Cls
Text 0,0,MilliSecs()
FlipCanvas(can)
If MouseDown(1)
While MouseDown(1)
Wend
EndIf
Until WaitEvent(0)=$803
My 2nd question is about keys. When you work with Textfiled, Buttons, etc... keys are not dectected anymore. How to do? Thanx |
| ||
| I think I encountered your first problem awhile back. If I recall correctly( been a long while ), I had a normal event loop, but was locking it in to a while..wend loop if the user interacted with the canvas. If you accidently moved off the canvas and hit a slider, the program would lock up and die a slow death.. I had to work around it with some crazy state tracking stuff to make sure the loop contained a waitevent() at some point. Might wanna give that shot ;) |