• 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: Detecting if UI thread is running, and creating a UI thread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detecting if UI thread is running, and creating a UI thread


  • Subject: Re: Detecting if UI thread is running, and creating a UI thread
  • From: Alexander Dymerets <email@hidden>
  • Date: Fri, 02 Mar 2007 19:11:28 +0200
  • Organization: The Product Engine (Odessa)

Hello Justin,

Justin Armstrong wrote:

The problem is that we cannot assume the caller of CreateJob() is actually a Cocoa/Carbon app with a UI thread. If the caller is a command line app then there will be no UI thread to handle the event loop and respond to the button click events. So...
If the library can be used in command-line tools, you should not link it with AppKit. Normally they don't have a Window Server connection. I think, it would be right to access AppKit classes, such as NSWindow, with NSClassFromString function. If NSClassFromString returns nil, then AppKit framework is not loaded and you should not do any UI operations.

Alexander
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: 
 >Detecting if UI thread is running, and creating a UI thread (From: Justin Armstrong <email@hidden>)

  • Prev by Date: Re: Detecting if UI thread is running, and creating a UI thread
  • Next by Date: Re: Help needed with saving Core Data app data
  • Previous by thread: Re: Detecting if UI thread is running, and creating a UI thread
  • Next by thread: Drawing with layout manager in a non-flipped view
  • Index(es):
    • Date
    • Thread