Re: Invoking command line commands with environment variables set
Re: Invoking command line commands with environment variables set
- Subject: Re: Invoking command line commands with environment variables set
- From: Andreas Monitzer <email@hidden>
- Date: Tue, 5 Aug 2003 16:09:56 +0200
On Tuesday, Aug 5, 2003, at 15:56 Europe/Vienna, James Quick wrote:
On Tuesday, August 5, 2003, at 04:54 AM, Terje Tjervaag wrote:
newtask = [[[NSTask alloc] init] retain];
NSMutableDictionary *env =[NSMutableDictionary [newTask environment];
I think that should be
NSMutableDictionary *env=[[newTask environment] mutableCopy];
[env setObject: @"/usr/local/share/foo" forKey: @"FOO_DIR"];
// Or addentriesFromDictionary, etc....
[newTask setDictionary: env];
[env release];
[newTask setLaunchPath:...];
[newTask setArguments:...];
// or setStandardError, directory, whatever.
[newTask launch];
andy
_______________________________________________
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.