afterDelay not working?
afterDelay not working?
- Subject: afterDelay not working?
- From: GW Rodriguez <email@hidden>
- Date: Thu, 26 Jan 2012 20:56:02 -0800 (PST)
I have a simple NSView class that is an indicator light that I want to flash. Here are the two methods to perform the flash:
-(void) performFlash {
if (ledOn) return;
ledOn = YES;
[selfsetNeedsDisplay:YES];
[selfperformSelector:@selector(endFlash) withObject:nilafterDelay:0.1];
}
-(void) endFlash {
if (!ledOn) return;
NSLog(@"Turning off LED");
ledOn = NO;
[selfsetNeedsDisplay:YES];
}
For some reason the afterDelay method isn't working. I know my simple methods work because when I call endFlash independently it works just fine. I have tried every permutation of the afterDelay method, I tried putting it in the delegate class, I tried using a NSTimer scheduleTimerWithTimeInterval: with no success.
I am completely stumped on something that should be extremely straightforward. Is there ANY instance where the afterDelay method wont work? I'm pulling my hair out on this one.
Thanks
GW
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden