• 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
NSTask, NSApp, and hiding
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTask, NSApp, and hiding


  • Subject: NSTask, NSApp, and hiding
  • From: "David Piasecki" <email@hidden>
  • Date: Wed, 19 Jan 2005 16:54:06 -0800

I'm trying to launch the Firefox browser from my main application using an NSTask while hiding my application until the Firefox application quits. I can launch Firefox with no problem, but my application hides after Firefox is closed, and I'm not sure why since I tell my application to "unhide". Maybe it will become clear if I paste the code...

- (IBAction)LaunchFirefoxFromMenu:(id)sender
{
	[NSApp hide:nil];	// hide current application

NSTask *task = [[NSTask alloc] init];
[task setLaunchPath:@"/Applications/Firefox.app/Contents/MacOS/firefox"]; // set launch path


	[task launch];	// launch firefox
	[task waitUntilExit];	// waits for firefox to exit before continuing

[NSApp unhide:nil]; // should unhide my application, bringing it back into view
}


Thanks,
David



_______________________________________________
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: NSTask, NSApp, and hiding
      • From: "M. Uli Kusterer" <email@hidden>
  • Prev by Date: Converting sound
  • Next by Date: Re: Converting sound
  • Previous by thread: Re: Converting sound
  • Next by thread: Re: NSTask, NSApp, and hiding
  • Index(es):
    • Date
    • Thread