You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
:delay Delay, in milliseconds, between calls. Defaults to 1000.
That's unfortunately not true, as this simple snippet of code can prove:
(defn-main []
(let [canv (canvas:background:red)
tim (timer
(fn [[c b]]
(if b
(config! c :background:black)
(config! c :background:red))
[c (not b)])
:initial-value [canv true])]
(show!
(frame:title"Sample":width500:height200:content canv
:on-close:exit))))
This is probably due to the fact that in the timer implementation, you are calling the constructor passing 0 as first argument, which in the Timer class represents both the initial delay and the delay between calls (this is also true for Java 8's Timer).
The text was updated successfully, but these errors were encountered:
Timer now has delay set to 1000ms by default.
The delay does not apply to the initial delay, which is initialized to 0ms.
Initially problem initially identified in issue clj-commons#192.
Timer now has delay set to 1000ms by default.
The default 1000ms delay does not apply to the initial delay, which is initialized to 0ms.
Problem initially identified in issue clj-commons#192.
In the
seesaw.timer
documentation it says:That's unfortunately not true, as this simple snippet of code can prove:
This is probably due to the fact that in the timer implementation, you are calling the constructor passing
0
as first argument, which in theTimer
class represents both the initial delay and the delay between calls (this is also true for Java 8'sTimer
).The text was updated successfully, but these errors were encountered: