Re: Strange problem
Re: Strange problem
- Subject: Re: Strange problem
- From: Michael James <email@hidden>
- Date: Thu, 29 Aug 2002 02:30:06 -0400
First off, if you are using a class method to get your NSTask, then
that means that it will be returning an autoreleased object.
Therefore, you shouldn't use [NSTask alloc]. Second, the [NSArray
arrayWithObjects:] method takes a nil-terminated list of objects, so
your code should look like this:
NSTask* uzduotiss = [NSTask launchedTaskWithLaunchPath:
@"/Library/photopc/photopc" arguments: [NSArray arrayWithObjects:
@"-h", nil]];
Try that. It should work now.
- Michael James
email@hidden
AIM/iChat: mj1531
Message: 14
Date: Thu, 29 Aug 2002 04:40:53 +0200
Subject: Strange problem
From: Aidas <email@hidden>
To: <email@hidden>
Hi all,
I use external application from my cocoa program but it always crashed
when
I'm doing so.
Here is my code:
NSTask *uzduotiss=[[NSTask alloc]
launchedTaskWithLaunchPath:@"/Library/photopc/photopc"
arguments:[NSArray
arrayWithObjects:@"-h"]];
It returns"Trying5.app has exited due to signal 10 (SIGBUS)."
Why it is happening?
Thank you
_______________________________________________
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.