• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTimer won't fire.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTimer won't fire.


  • Subject: Re: NSTimer won't fire.
  • From: j o a r <email@hidden>
  • Date: Thu, 2 Dec 2004 16:36:36 +0100

And you're not doing anything funky, like using threads, being busy in a tight loop, running a modal loop, keeping a menu open, keeping the mouse button pressed in a tab view, or other control, et.c.? This is just something that you set up in response to a simple button action (or similar), and when the timer is supposed to fire, the application is completely idle?

My advice to you: Try to recreate your problem in a small sample app. If you can't, then you know that the problem is in your sources. If you can, post an URL to the sample app to the list to allow us to see what's going on.

j o a r

On 2004-12-02, at 15.10, zeichensprecher wrote:

I want to fire a timer, but whatever I do, the timer gets _never_ fired, exept when I call [timer fire].
What type of application is this? If it's not a "standard Cocoa application",

It is pure Cocoa / Objective-C. Just one additional MIDI-framework. NSDocument structure, has windows, controllers and everything else...


are you sure that the run loop is running, and that you're running in the default run loop mode?

Well, actually I'm not sure, but I thought it's like this:

1. I add the timer to [NSRunLoop currentRunLoop],
2. then I release the timer, because the manual tells me it is retained by adding to the runLoop
3. _then_ I call [timer isValid] =>
if the runLoop would _not_ have added the timer, it wouldn't be there anymore, because the timer had never been retained,


isn't that the case?



Moreover: the timer gets fired, when I explicitly call [timer fire].
But it does never fire by itself ???

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >NSTimer won't fire. (From: zeichensprecher <email@hidden>)
 >Re: NSTimer won't fire. (From: j o a r <email@hidden>)
 >Re: NSTimer won't fire. (From: zeichensprecher <email@hidden>)

  • Prev by Date: Event loop
  • Next by Date: Re: Swapping isa's (was Re: Hex Edit controls (resknife))
  • Previous by thread: [solved]: NSTimer won't fire.
  • Next by thread: Graphic's project
  • Index(es):
    • Date
    • Thread