Re: Bringing an NSTask forward
Re: Bringing an NSTask forward
- Subject: Re: Bringing an NSTask forward
- From: "John C. Randolph" <email@hidden>
- Date: Thu, 3 Apr 2003 12:23:54 -0800
On Thursday, April 3, 2003, at 11:37 AM, ROSE,ROBERT W
(HP-Corvallis,ex1) wrote:
>
Hi all, I'm not sure if I'm using this class the way it was intended,
>
but
>
I'm using NSTask in my "background" (command line) application to
>
launch a
>
foreground (gui) application. The problem is, after I launch the
>
NSTask gui
>
program it doesn't come to the foreground. I would like to be able to
>
bring
>
the program to the foreground after I launch it.
>
>
Is there a way to bring an NSTask forward, or do I have to use the
>
good'old
>
Process Manager?
I would suggest just this NSWorkspace method instead of trying to drive
it from an NSTask.
- (BOOL) launchApplication: (NSString *) appName
Launches the application appName .appName need not be specified with a
full path and, in the case of an application wrapper, may be specified
with or without the .app extension, as described in Use of .app
Extension . Returns YES if the application is successfully launched or
already running, NO if it cant be launched.
Before this method begins, it posts an
NSWorkspaceWillLaunchApplicationNotification to the NSWorkspaces
notification center. When the operation is complete, it posts an
NSWorkspaceDidLaunchApplicationNotification .
See Also: launchApplication:showIcon:autolaunch:
-jcr
John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
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.