I’ve made a blank new app for testing with nothing else than the timer:
property parent : class "NSObject"
property theWindow : missing value
property theTimer : missing value
return current application's NSTerminateNow
my theTimer's invalidate()
set my theTimer to current application's NSTimer's scheduledTimerWithTimeInterval:theSec target:me selector:"timerDidFire:" userInfo:(missing value) repeats:true
log "timer is running = " & (theTimer's isValid())
The timer continues to fire when I switch from the app to Xcode or any other app.
invalidate() method, Apple’s documentation says : “You must send this message from the thread on which the timer was installed.”
Can it be the cause?