discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about NSRunLoop -runUntilDate:


From: Chris Vetter
Subject: Re: Question about NSRunLoop -runUntilDate:
Date: Mon, 1 Aug 2005 12:04:19 +0200 (MEST)

On Mon, 01 Aug 2005 08:53:23 Richard Frith-Macdonald wrote:
> > Maybe this has an obvious answer but if so I can't see it... :-(
> The documentation for -runUntilDate: says
> Runs the loop in NSDefaultRunLoopMode by repeated calls to 
> -runMode:beforeDate: while there are still input sources.  Exits when no 
> more input sources remain, or date is reached, whichever occurs first.

Yes, I know, but...

> So I guess you could send the notification when the method returns.

While the runloop 'runs' for X minutes, it contains a timer that fires every
Y seconds calling a selector. There is no method 'blocking' the application,
rather the runloop works in the background.

I was hoping that once the runloop stops, it would invalidate (which could
be checked) but that doesn't seem to be the case.

Would it be possible to create an observer that checks -limitDateForMode: ?
As far as I understand its documentation, if there is no timer scheduled
(anymore) the method should return no date (nil?) -- which would mean that
the limitDate (used in -runUntilDate:) has been reached.

Cheers,

-- 
Chris

-- 
GMX DSL = Maximale Leistung zum minimalen Preis!
2000 MB nur 2,99, Flatrate ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl




reply via email to

[Prev in Thread] Current Thread [Next in Thread]