• 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: creating a cocoa nsapp event polling callback
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: creating a cocoa nsapp event polling callback


  • Subject: Re: creating a cocoa nsapp event polling callback
  • From: Daniel Dickison <email@hidden>
  • Date: Thu, 27 Sep 2007 15:19:08 -0400

I guess I'm looking something like this:

- (void)
publicMethodCalledBeforePollingNSApplicationsNextEventsPerFrame;

Is there anything like this?

How about overriding NSApplication's -sendEvent:?

The problem with -sendEvent: is that it doesn't get called for mouse- up events if a control takes over the event queue in an event tracking run loop (which NSButton etc. does).


I think Quartz Event Taps are the correct way to do this, although I haven't used it myself:
http://developer.apple.com/documentation/Carbon/Reference/ QuartzEventServicesRef/Reference/reference.html


Before I learned about Quartz Events, I implemented something similar by hacking -sendEvent: and the various NSControl subclasses' - mouseDown: and using +poseAsClass:. Not recommended, though you can get it to work...

Daniel
_______________________________________________

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


  • Prev by Date: Re: [Moderator] unacceptable behavior
  • Next by Date: (NSURLDownload)The control never reaches downloadDidFinish:
  • Previous by thread: Re: creating a cocoa nsapp event polling callback
  • Next by thread: Printing : how to force paper format ?
  • Index(es):
    • Date
    • Thread