Re: Never Mind the File Extensions
Re: Never Mind the File Extensions
- Subject: Re: Never Mind the File Extensions
- From: Brendan Younger <email@hidden>
- Date: Wed, 8 May 2002 22:24:26 -0400
Something like this:
[[[NSWorkspace sharedWorkspace] notificationCenter] addObserver:self
selector:@selector(myMethod:)
name:NSWorkspaceDidLaunchApplicationNotification object:nil];
(note that this was typed in Mail and may not be wholly correct)
Brendan Younger
On Wednesday, May 8, 2002, at 10:03 PM, Patrick Tescher wrote:
I agree that you should have the PID but couldn't you find that out
from the
application name? If you can I can start a program that will run in the
background and delete application that are not allowed.
P.S. If anyone has an example of doing something like this could you
send it
my way? I don9t have a lot of NSWorkspace experience.
On Wednesday, May 8, 2002, at 03:20 PM, Patrick Tescher wrote:
Apparently you can set up a notification whenever an application is
launched
from the Finder. Does anyone have any experience with this?
The Cocoa way is via NSWorkspace, but unfortunately the notification
you
receive is a bit iffy and only gives you the application name as an
NSString. I filed a bug that this should also at least give the PID or
carbon PSN.
_______________________________________________
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.