jd@lri.uwo.ca (J. Davis) (06/02/90)
I am interested in writing an application program having a Sunview-like user interface (buttons, sliders, etc.). I found the itemdemo postscript file which has all kinds of slick stuff, but my problem is interfacing with my main C program. So far, the documentation found in the 4Sight programmer's guide has proven too sketchy to be of much use to me. What I need is a pair of simple programs (.cps, .c) which will show how to use PostScript to set up a window with, say, a button, and pass the button value back to the calling C routine. Thanks for any help.
ajp2o@crocus.medicine.rochester.edu (Anthony J. Persechini) (01/24/91)
I have been using the news-illustrator program and like it,
except that psh seems to be invoked in the HOME directory
rather than in PWD. I would like to be able to write files
into the directory where I invoke the program, but
(PWD) getenv returns my HOME. Is there a way to
get psh programs to write files into the invoking
shell's PWD?
--
Anthony Persechini Dept. of Physiology, Box 642
Assistant Professor School of Medicine
>>>>>>>>>>>>>>>>>>> University of Rochester
ajp2o@crocus.medicine.rochester.edu Rochester, NY 14642
msc@ramoth.esd.sgi.com (Mark Callow) (01/25/91)
In article <1991Jan23.185734@crocus.medicine.rochester.edu>, ajp2o@crocus.medicine.rochester.edu (Anthony J. Persechini) writes: |> I have been using the news-illustrator program and like it, |> except that psh seems to be invoked in the HOME directory |> rather than in PWD. I would like to be able to write files |> into the directory where I invoke the program, but |> (PWD) getenv returns my HOME. Is there a way to |> get psh programs to write files into the invoking |> shell's PWD? psh sets up a connection to the NeWS server. All the PostScript commands you are sending to psh are being transmitted to the NeWS server and are executed there. The NeWS server is started when you login so its PWD is $HOME. To make the NeWS server read or write files elsewhere you have to give the full path name of the file. One trick you can use is to automatically generate the appropriate full path name is to embed the PostScript program as a "here" document in a shell script. For example #! /bin/sh psh <<EOF /File $PWD/foo def EOF The shell will substitute $PWD before sending the PostScript statement to psh. -- From the TARDIS of Mark Callow msc@ramoth.sgi.com, ...{ames,decwrl}!sgi!msc "Spirits of genius are always opposed by mediocre minds" - Albert Einstein