lunch application
lunch application
- Subject: lunch application
- From: "한유림" <email@hidden>
- Date: Fri, 28 Oct 2005 14:20:44 +0900 (KST)
- Importance: Normal
Hi,
I want to open the other application on my program.
I tried NSWorkspace for lauch app(ABC Installer).
This method is well-opened. But my program does not know the end of ABC Installer.
So I was changed to NSTask. But it is not called when my program is run. It occured "launch path not accessible" problem.
But in case of TextEdit.app, no problem.
Here's is my code...
--------------------------------------------------------------------------------------------------------------------------------------------------
NSTask *aTask = [[NSTask alloc] init];
// [[NSWorkspace alloc] launchApplication:@"/Volumes/COM/ABC Installer/ABC Installer"]; //1.NSWorkspace
[[aTask setLaunchPath:@"/Volumes/COM/Installer/ABC Installer/Contents/MacOSClassic/ABC Installer"]; //2.NSTask
// [aTask setLaunchPath:@"/Volumes/OS X/Applications/TextEdit.app/Contents/MacOS/TextEdit"]; //3.TextEdit.app
[aTask autorelease];
[aTask launch];
[aTask waitUntilExit];
if ([aTask isRunning])
{
NSLog(@"Task is running.");
}
else
{
NSLog(@"end.");
[NSApp terminate:self];
}
------------------------------------------------------------------------------------------------------------------------------------------------
does anyone have an idea? help me..
ally.
_______________________________________________
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