• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
lunch application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: lunch application
      • From: John Stiles <email@hidden>
  • Prev by Date: NSToolbar overflow menu updating problems
  • Next by Date: Re: List of AppKit NSSound names
  • Previous by thread: NSToolbar overflow menu updating problems
  • Next by thread: Re: lunch application
  • Index(es):
    • Date
    • Thread