• 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: Threading and NSApplicationMain()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Threading and NSApplicationMain()


  • Subject: Re: Threading and NSApplicationMain()
  • From: Nick Zitzmann <email@hidden>
  • Date: Tue, 12 Sep 2006 23:24:31 -0600


On Sep 12, 2006, at 10:51 PM, Rob Ross wrote:

I'm running a Java app, and using JNI calling a native method which is trying to exercise methods in NSApplication or NSWorkspace, like hideOtherApplications, which seem to do nothing when I call them.

Use NSApplicationLoad() if you're trying to use AppKit classes without loading a main nib or invoking NSApplication's event loop.


Does anyone know if NSApplicationMain() starts the app in a new thread, or in the same thread from which it is called?

NSApplicationMain() always launches in the same thread, which had better be the main thread since a good deal of the AppKit is not thread-safe.


Nick Zitzmann
<http://www.chronosnet.com/>




_______________________________________________ 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
  • Follow-Ups:
    • Re: Threading and NSApplicationMain()
      • From: Rosyna <email@hidden>
References: 
 >Threading and NSApplicationMain() (From: Rob Ross <email@hidden>)

  • Prev by Date: Threading and NSApplicationMain()
  • Next by Date: RE: How to know user clicks [print] button in cocoa PDE
  • Previous by thread: Threading and NSApplicationMain()
  • Next by thread: Re: Threading and NSApplicationMain()
  • Index(es):
    • Date
    • Thread