case "OnMouseDown"
if msg.id = #ARROWUP
if listerY <> 0
listerY = listerY - 1
drawUI(0)
endif
elseif msg.id = #ARROWDOWN
if listerY <> p_tableSize(listing$)-17 ; *** 17 is a temporary value ***
listerY = listerY + 1
drawUI(0)
endif
endif
wait(10) ; a tiny delay so the lister doesn't move up or down too quickly / would be useful if this value decreased the longer the
; button is held
I was hoping this piece of code would constantly run as long as I held the left mouse button down without me having to code anything further! But alas it does not! Is something blocking it from it re-iterating through the code? What should I do/look for?
Well atm I am not using CheckEvent all, I have a While....Wend loop with a WaitEvent within main(). With various events launched here and there in different routines, can't post complete source - much too many lines, if I can't find a solution I'll upload the project to OS4Depot nearer the time of completion and hope so one can take a look at the source code and come up with answer.
I am also trying to implement a scrollbar which will also require not only OnMouseDown, but also the X and Y of the mouse pointer so its vital I find out what is happening.
Basically there shouldnt be much difference, but just came to my mind that what if there is bug in hollywood on usage of waitevent and onmousedown together.
I have used onmousedown to do things like growing speed bar or increasing throw power, and i think i used checkevent and onmousedown on button and it worked fine.