Threading and NSApplicationMain()
Threading and NSApplicationMain()
- Subject: Threading and NSApplicationMain()
- From: Rob Ross <email@hidden>
- Date: Tue, 12 Sep 2006 21:51:00 -0700
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.
(I've checked and [NSApplication sharedApplication] is returning a
non-nil object)
I don't think the NSApplication is set up yet because isRunning and
isActive both return NO.
Does anyone know if NSApplicationMain() starts the app in a new
thread, or in the same thread from which it is called?
I am asking because I am trying to figure out why my NSApplication
instance doesn't seem to respond to any messages.
I thought maybe I should call NSApplicationMain() or -run on the
NSApplication object. But I don't know what I need to setup before I
can call these, or if I'm supposed to call it from a new Thread, and
if so, should that be a new native thread, or one created on the JVM
via JNI.
I'm brand spanking new to JNI programming, and still new with Cocoa.
Any pointers?
Thanks.
Rob Ross, Lead Software Engineer
E! Networks
email@hidden
---------------------------------------------------
"Beware of he who would deny you access to information, for in his
heart he dreams himself your master." -- Commissioner Pravin Lal
_______________________________________________
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