Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
MyApplication.m
#import "MyApplication.h" |
#import "AppController.h" |
@implementation MyApplication |
#if 1 |
- (NSEvent *)nextEventMatchingMask:(unsigned int)mask |
untilDate:(NSDate *)expiration inMode:(NSString *)mode dequeue:(BOOL)flag |
{ |
NSEvent *event; |
NSDate *now; |
int send_event; |
do |
{ |
event = [super nextEventMatchingMask:mask untilDate:[NSDate distantPast] inMode:mode dequeue:flag]; |
/*if(event == nil)*/ [[self delegate] UpdateDrawing]; |
now = [[NSDate alloc] initWithTimeIntervalSinceNow:0]; |
if(!event && ([expiration compare:now] > 0)) send_event = false; |
else send_event = true; |
[now release]; |
} while(!send_event); |
return event; |
} |
#else |
- (NSEvent *)nextEventMatchingMask:(unsigned int)mask |
untilDate:(NSDate *)expiration inMode:(NSString *)mode dequeue:(BOOL)flag |
{ |
NSEvent *event; |
event = [super nextEventMatchingMask:mask untilDate:expiration inMode:mode dequeue:flag]; |
[[self delegate] UpdateDrawing]; |
return event; |
} |
#endif |
@end |
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-07-07