Re: launching cml without duplicating Terminal
Re: launching cml without duplicating Terminal
- Subject: Re: launching cml without duplicating Terminal
- From: Alex Keresztes <email@hidden>
- Date: Wed, 12 Dec 2001 09:46:32 -0600
Jake,
I didn't mean to use that explicit NSWorkspace function, but something
from in there.
Just tested this and it works:
[[NSWorkspace sharedWorkspace] openFile: @"/usr/bin/top"
withApplication: @"Terminal"];
Have fun,
Alex
On Wednesday, December 12, 2001, at 09:27 AM, Jake wrote:
already tried that.
[[NSWorkspace sharedWorkspace] launchApplication:@"/usr/bin/top"];
doesn't work.
Instead of using an NSTask to launch an application use NSWorkspace's
functions.... like
- (BOOL)launchApplication:(NSString *)appName
Alex
On Wednesday, December 12, 2001, at 08:22 AM, Jake wrote:
While the following worked fine launching the program. However if
terminal is already open, it will open another copy(separate icon in
the dock) and run the program. There is no man page for Terminal. So
how does one open a commanline process without launching an additional
copy Terminal if one is already running?
NSArray *arg;
arg = [NSArray arrayWithObject:@"/usr/bin/top"];
[NSTask launchedTaskWithLaunchPath:
@"/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal"
arguments:arg];
thanks. jake