Issue with Juce::Timer class


#1

Probably a stupid one but, I’ve subclass it, overrided the timerCallback
all this in a simple console app. Unfortunately when the code
reach the endless loop (an end event will come from another thread),
the timerCallback is never reached !

==> should I add something like application.processMessage() in my loop ?

Thx


#2

The Timer class is event-based, so will only work in an event-loop-based app, which generally doesn’t mean a console app. You can hack it by explicitly running the message loop, but there are very few situations where that’d be a sensible way to structure your app.

Normally, you either write a fully event-based app, or a console app with threads and no events.