Re: Waiting for a Cocoa app to die...
Re: Waiting for a Cocoa app to die...
- Subject: Re: Waiting for a Cocoa app to die...
- From: "Mike T. Miller" <email@hidden>
- Date: Fri, 21 Nov 2003 18:07:17 -0800
Hate to reply to myself, but I figured it out.
A little further digging revealed that I needed to use the run loop
from NSApplication instead of [NSRunLoop currentRunLoop] to get
notified of events from the shared workspaces notification center.
There seems to be little info out there on accessing Finder (workspace)
functionality from a non-gui program.
-mike
On Nov 21, 2003, at 3:07 PM, Mike T. Miller wrote:
I'm trying to build a command line tool that will wait for a given
application to terminate (needed for some scripting). I'm new to
Cocoa, so I'm sure I'm missing something obvious.
I've tried building a Foundation tool that registers with
NSNotificationCenter for
NSWorkspaceDidTerminateApplicationNotification, but that isn't working
(I suspect the workspace's notificationcenter only has real meaning
within a run loop).
'open' doesn't help since it doesn't wait for the application to
terminate.
Any ideas?
--
Mike T. Miller
Sr. Java Architect, NorCal Software Services
Sun Microsystems, Inc.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.