• 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
NSTimer not getting called with "shared" object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTimer not getting called with "shared" object


  • Subject: NSTimer not getting called with "shared" object
  • From: Jesus De Meyer <email@hidden>
  • Date: Wed, 27 Oct 2004 20:53:04 +0200

I dunno if I did something wrong, but when I call a method in my sharedInstance object the selector of a timer doesn't get called.

I solved this however by using an NSThread and timing 5 seconds like below. It ain't pretty but it works:

Inside my method that gets called:

seconds = TickCount();
[NSThread detachNewThreadSelector:@selector(fadeOut:) toTarget:self withObject:Nil];

Inside the fadeOut selector:

do {
} while ((TickCount()-seconds) < 60); //Wait 5 seconds before continuing
_______________________________________________
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
  • Prev by Date: NSWindow Settings
  • Next by Date: Re: Cocoa Java futures, NDA's etc
  • Previous by thread: Re: NSWindow Settings
  • Next by thread: Populate a NSPopupButton with ascii
  • Index(es):
    • Date
    • Thread