• 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: alarm under Alert
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: alarm under Alert


  • Subject: Re: alarm under Alert
  • From: Julien Jalon <email@hidden>
  • Date: Tue, 4 Dec 2001 13:59:26 +0100

Le mardi 4 dicembre 2001, ` 08:28 AM, Jake a icrit :

I notice that NSRunAlertPanel disables both NSTimer and unix signals. I
am trying to display an alert panel, and if there is no response from
the user for a while. I would like to go ahead and start some recovery
processing. Is there an easier way to accomplish such behavior?



Try to add the timer to the modal run loop mode. Something like this:
NSTimer *aTimer=[NSTimer timerWithTimeInterval:...];
[NSApp addTimer:aTimer forMode:NSModalPanelRunLoopMode];

instead of:
NSTimer *aTimer=[NSTimer scheduledTimerWithTimeInterval:...];

which add the timer to the default run loop mode.

--
Julien Jalon
<http://mapage.noos.fr/jalon>


References: 
 >alarm under Alert (From: Jake <email@hidden>)

  • Prev by Date: Cocoa & signal handlers
  • Next by Date: ObjC++
  • Previous by thread: Re: stripping /Contents/MacOS
  • Next by thread: Why resizing doesn't work for me ?
  • Index(es):
    • Date
    • Thread