I don’t want ToolbarButtons to auto repeat, but repeatTimer in Button class is used for other purposes and I think it allways auto repeats no matter what I give to setRepeatSpeed.
Eh? It should only auto-repeat if you tell it to.
I can’t get it to go wrong here - any idea what you’re doing that might be causing it?
getRepeatTimer().startTimer is called from
with no reference to “autoRepeatDelay”
(other calls are made only when autoRepeatDelay>=0)
and once the Timer Callback is called, it begins to send repeat clicks.
I am writing an MDI application and have no Menubars, only Toolbar. Toolbar buttons are used for new window commands. Sometimes when the button is clicked, it sends 350 clicks from this timer callback. Thus I get 350 windows opened.
Strange. It all looks like it should be fine to me - can’t see a circumstance where it’d go wrong…
But I guess a safety check is all that’s needed, at line 654:
else if (autoRepeatSpeed > 0 && ((isMouseButtonDown() && isMouseOver()) || isKeyDown))
thanks, that would do, I will check.
and that worked… thanks again.