This is Problem-with-launchProgram:ok: in view mode; [Up]
Date: Sun 03-Oct-1991 22:09:52 From: cc@capmkt.COM (Charlie Conklin) Subject: Problem with launchProgram:ok: Has anybody seen or have an explanation for this behavior? I am trying to use launchProgram:ok: to launch a program via. the Workspace. Some of the time it works, some of the time it doesn't! The simple code is below, which just takes the text from a TextField, and tries to launch that program. Any app name which is not an executable, but an app directory (ending in .app) will launch if it is in the Dock, but otherwise will not. When not in the dock, the launch starts, the icon is displayed at the bottom of the screen in a highlighted mode, then I am treated to the curse of the spinning cursor for a while. Then a panel comes up which says "Still waiting for <app> to launch. Continue to wait?". The app never completes the launch. Any ideas would be greatly appreciated! Charlie Conklin cc@capmkt.com #import "MyObject.h" @implementation MyObject - appDidInit:sender { [[NXApp appSpeaker] setSendPort:NXPortFromName(NX_WORKSPACEREQUEST, NULL)]; return self; } - launchApp:sender { char *name; int flag; name = [MyTextField stringValue]; fprintf(stderr, "*****************************\n"); fprintf(stderr, "Launching %s!!!\n", name); [[NXApp appSpeaker] launchProgram:name ok:&flag]; if (!flag) fprintf(stderr, "Could not launch Program!!!\n"); fprintf(stderr, "*****************************\n"); return self; } @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Marcel Waldvogel and Netfuture.ch.