Your timer is not firing because the run loop is not ever getting run
for the "Fubar" mode. For run loop input sources to be processed the
run loop needs to be run in the mode that those sources are scheduled
for. So, you might try something more like this
[[NSRunLoop currentRunLoop] addTimer:[NSTime timerWithTimeInterval:1
target:self selector:@selector(stopIt:) userInfo:nil repeats:NO]
forMode:NSDefaultRunLoopMode];
Another way to do this would be -
[NSTimer scheduledTimerWithTimeInterval:1 target:self
selector:@selector(stopIt:) userInfo:nil repeats:NO];
Hope this helps.
ryan
--
Ryan Dingman
<ryan...>
On Monday, May 14, 2001, at 09:25 PM, Daniel Staudigel wrote:
> I tried the line of code:
> [[NSRunLoop currentRunLoop] addTimer:[NSTimer timerWithTimeInterval:1
> target:self selector:@selector(stopIt:) userInfo:nil repeats:NO]
> forMode:@"Fubar"];
>
> Why does it not work?
>
> Daniel Staudigel
>
> ---------------
>
> How to fly: Find a nice big cliff, jump off, and miss the ground!
> Easy enough!
> _______________________________________________
> MacOSX-dev mailing list
> <MacOSX-dev...>
> http://www.omnigroup.com/mailman/listinfo/macosx-dev