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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to