Re: Process events in a QuickTime export callback
Re: Process events in a QuickTime export callback
- Subject: Re: Process events in a QuickTime export callback
- From: Uli Kusterer <email@hidden>
- Date: Fri, 25 Aug 2006 12:11:36 +0200
Am 25.08.2006 um 01:04 schrieb Trygve Inda:
while (ReceiveNextEvent (0, NULL, 0, true, &event) == noErr)
{
SendEventToEventTarget (event, GetEventDispatcherTarget());
ReleaseEvent(event);
}
This code is in a QuickTime export callback...Apple's sample uses:
event = [progressSheet nextEventMatchingMask:NSLeftMouseUpMask
untilDate:[NSDate distantPast] inMode:NSDefaultRunLoopMode
dequeue:YES];
if (event && NSPointInRect([event locationInWindow], [progressCancel
frame]))
{
[progressCancel performClick:self];
shouldContinue = NO;
}
Apple's code is close. You can do a nextEventMatchingMask:... on
NSApp but pass a wider mask (that includes all other events) and then
just use NSApp's sendEvent: method to dispatch the event. That should
give you the Cocoa equivalent of above Carbon code.
Cheers,
-- M. Uli Kusterer
http://www.zathras.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden