problem with NSTimer
problem with NSTimer
- Subject: problem with NSTimer
- From: Kiran Kumar S <email@hidden>
- Date: Fri, 8 May 2009 15:21:23 +0530
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 (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