according to documentation for beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo: it says that While the application is in the run loop, it does not respond to any other events (including mouse, keyboard, or window- close events) unless they are associated with the sheet. It also does not perform any tasks (such as firing timers) that are not associated with the modal run loop. But in my app the timer i had created fires even my main window is in running as Modal
                
- (id)init
{
    self = [super init];
    if (self) {
timer = [NSTimer scheduledTimerWithTimeInterval:5.0f target:self selector:@selector(timerPinged:) userInfo:nil repeats:YES];
    }
    return self;
}

-(void)timerPinged:(NSTimer*)timere
{
    NSLog(@"timer pinged");
}
-(IBAction)raiseSheet:(id)sender
{
[NSApp beginSheet:syncPanel modalForWindow:window modalDelegate:nil didEndSelector:nil contextInfo:nil];
}       

_______________________________________________

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

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

Reply via email to