🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.next.programmer
1 messages
1 total messages Started by Nicolas Strobel Fri, 17 Apr 1992 17:22
NeXTstep application needing shell environment
#739
Author: Nicolas Strobel
Date: Fri, 17 Apr 1992 17:22
31 lines
2382 bytes
Help!
	I have created an IB interface around a program (called snapplot) that 
used to be run from the shell level. Snapplot would take a bunch of arguments
from the command line (like the datafile, x,y range, axis labels, etc.) and
create a postscript file of the plot.  Now the interface consists of a bunch
of text fields (one for each of the former command line arguments) and a
plot window. The NeXT program (called snapplot_next) reads in all of the
text fields, creates a commandline argument array, fires that off to the work-
horse function snapplot (now just a "normal" function--not main() ), which 
takes the info and executes all the PS (display postscript) commands to make
the plot in the plot window.
	The problem is that execution of snapplot_next by double clicking on
its icon in the File Browser (or executing the command: open snapplot_next)
does not work properly--it exits/crashes before doing anything. YET when I
start the application by entering "snapplot_next" at a terminal shell prompt,
it works fine. Apparently the core function snapplot needs the environment
given to it by the terminal/shell (the environment variables, etc.). 
	Any ideas how I can give the application a "shell-like" environment?
A very clunky way is to make a csh executable file with the command 
"snapplot_next" inside it.  This brings up a shell window and the application.
I don't want the shell window. I don't think I'm wanting to start a subprocess,
so the Subprocess.m code in Examples is probably not the answer here. If I was 
writing commercial code, I would do extensive surgery on the thousands of lines 
of code so it wouldn't rely on the "shell" environment, but it's not--a 
"mission critical app" :)

Thanks for your help!

Nick Strobel
strobel@phast.phys.washington.edu
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads