Re: Cocoa shell works great from PB, crashes as standalone.
Re: Cocoa shell works great from PB, crashes as standalone.
- Subject: Re: Cocoa shell works great from PB, crashes as standalone.
- From: Finlay Dobbie <email@hidden>
- Date: Tue, 23 Oct 2001 18:48:21 +0100
On Tuesday, October 23, 2001, at 06:36 pm, email@hidden
wrote:
This is wrong; try something like
[gameserver setLaunchPath:[[NSBundle mainBundle]
pathForResource:@"TCPServerAlpha" ofType;@""]];
[gameserver launch]; //<-- if I comment this out, it works.
}
Never rely on a relative path.
Yes, well, PB just happens to set it up correctly, whereas the Finder
doesn't. Putting your executable in the resources and using the NSBundle
method is the way to go, though :-)
-- Finlay