cocoa app is cancelling shutdown
cocoa app is cancelling shutdown
- Subject: cocoa app is cancelling shutdown
- From: Elizabeth Kellner <email@hidden>
- Date: Wed, 21 Jul 2010 12:27:12 +0200
Hi,
I have a cocoa app which is cancelling shutdown (message in german is
"das Programm hat das Beenden abgebrochen"), and I don't know why. It
also only happens sometimes. I am trying to shutdown with the
applescript "tell application "System Events" to shut down", and I
can't figure out what is causing the shutdown to cancel.
The app delegate's applicationShouldTerminate: is apparently not being
called, so its not that. My app delegate doesn't define anything else
besides applicationDidFinishLaunching: , so it doesn't seem to be the
delegate.
I have a couple ideas but neither has suggested a possible fix:
First is that app in question is a cocoa app that previously was a
command line app, and so it is *not* calling NSApplicationMain. It
starts its own run loop. Although I'm calling CFRunLoopRunInMode in
the loop, could there be some other something that I need to do in the
run loop that would potentially cause a shutdown to cancel? Before
when this was a command line tool, this shutdown problem never
occurred.
Second is that this app is being launched programmatically from
another app, using [NSTask launchedTaskWithLaunchPath:arguments:]. If
I launch the app directly, it does not seem to impede shutdown. Is
there somehow a way for a retained subprocess to cause a shutdown to
abort?
Thanks for any insight,
Elizabeth
_______________________________________________
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