• 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: OSX have that is equivalent to WaitMessage() Win32 API
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OSX have that is equivalent to WaitMessage() Win32 API


  • Subject: Re: OSX have that is equivalent to WaitMessage() Win32 API
  • From: Jens Alfke <email@hidden>
  • Date: Sun, 18 Oct 2009 23:27:16 -0700

You're looking for CFRunLoop (or NSRunLoop if you want to use Objective-C), which is the way event loops and event handling work on Mac OS X.

But there isn't a function like WaitMessage, because the loop is inside-out — instead of writing your own event loop, the system runs it, and calls you when things happen.

IMHO trying to port code from another platform literally like this is doomed to failure, just like attempting to translate a French novel into English by using Google Translate. What you should do instead is learn to write programs for OS X (preferably in Cocoa), then implement the program for that platform, bringing in as much of the existing code as possible (but not more.)

—Jens_______________________________________________

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


References: 
 >OSX have that is equivalent to WaitMessage() Win32 API (From: Mars999 <email@hidden>)

  • Prev by Date: Re: Core data unable to save Date, Name etc.
  • Next by Date: Re: Programming Style: Method Definition with or without a semicolon.
  • Previous by thread: Re: OSX have that is equivalent to WaitMessage() Win32 API
  • Next by thread: Re: OSX have that is equivalent to WaitMessage() Win32 API
  • Index(es):
    • Date
    • Thread