• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Process events in a QuickTime export callback
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Process events in a QuickTime export callback (From: Trygve Inda <email@hidden>)

  • Prev by Date: Re: dataFromFile
  • Next by Date: Dragging multiple AB record
  • Previous by thread: Re: Process events in a QuickTime export callback
  • Next by thread: Another user defaults question
  • Index(es):
    • Date
    • Thread