• 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
Re: Cocoa shell works great from PB, crashes as standalone.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa shell works great from PB, crashes as standalone.


  • Subject: Re: Cocoa shell works great from PB, crashes as standalone.
  • From: email@hidden
  • Date: Tue, 23 Oct 2001 19:36:13 +0200

On Tuesday, October 23, 2001, at 07:04 PM, Chilton Webb wrote:

- (void)StartServer {
[StartButton setEnabled:NO];
[StopButton setEnabled:YES];
[statusbox setStringValue:@"Server is running. Click 'Stop' to stop it."];
gameserver=[[NSTask alloc] init];
[gameserver setLaunchPath:@"./TCPServerAlpha"];

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.

Regards,
John Hornkvist
--
ToastedMarshmallow, the perfect Cocoa companion
http://www.toastedmarshmallow.com


References: 
 >Cocoa shell works great from PB, crashes as standalone. (From: Chilton Webb <email@hidden>)

  • Prev by Date: Re: Selecting multiple cells in a NSMatrix
  • Next by Date: Re: Help for Help
  • Previous by thread: Cocoa shell works great from PB, crashes as standalone.
  • Next by thread: Re: Cocoa shell works great from PB, crashes as standalone.
  • Index(es):
    • Date
    • Thread