Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!ucbvax!TC2.CHEM.IASTATE.EDU!atchity From: atchity@TC2.CHEM.IASTATE.EDU Newsgroups: comp.sys.sgi Subject: Mathematica 4Sight bugs Message-ID: <9011191728.AA24203@tc2.chem.iastate.edu> Date: 19 Nov 90 17:28:47 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 320 We recently received an upgrade for Mathematica which introduced at least two bugs associated with the use of 4Sight. I thought there might be others out there who could benefit from my workarounds. Both problems and workarounds are contained in the file 4Sight.view, a revied version of which I've appended to this note. 4Sight.view is normally located in $mathdir/Bin.Iris/Display. Bug 1: This is not really a bug, but mathematica now uses a temporary file when displaying 4Sight graphics which is put by default in /tmp. If the NEWSSERVER on another machine is being used (e.g. you're logged on remotely) the directory /tmp must be mounted on the remote machine. My workaround was to change the variable "file" in 4Sight.view from "/tmp/NeWS.view$$" to a path that is accessible to all our PI's. Bug 2: This is a serious bug that affects the NEWSSERVER on the PI displaying the mathematica 4Sight graphics. The 4Sight windows used for displaying mathematica graphics have a menu for changing some of the display parameters. The menu must not be implemented correctly (I'm no NeWS guru, so I really don't know exactly what is wrong) because any other 4Sight window brought up after the first mathematica window (e.g. wsh) will display the mathematica menu IN ADDITION TO any menu normally associated with that window. Accidentally choosing an option from the superimposed mathematica menu will result in the death of the window. My workaround creates and calls the mathematica menu by name (NewMathMenu) which doesn't seem to be exported to any other window. Here is my version of 4Sight.view (with the original temporary file path). -------------------------------------------------------------------------------- #! /bin/sh -f imagetitle="Mathematica Graphics" nodistort=true # default no-stretching: yes while :; do case $# in 0) break 2 ;; esac case "$1" in -T) shift imagetitle="$1" shift ;; -h) shift # imageheight="$1" shift ;; -w) shift # imagewidth="$1" shift ;; -stretch) nodistort=false shift ;; -*) echo 'Usage: NeWS.view [-T title] [-stretch] [file]' >&2 exit 1 ;; *) break 2 ;; esac done # other defaults # line quality, between 0 and 1; 1 is best (and slowest) linequality=0.5 # # temporary file name: must be accessible to all PI's displaying 4Sight graphics # # save input in file file=/tmp/NeWS.view$$ cat $@ > $file ( cat <<'!' false setautobind % so that redefs work... ! psfix ) LineMenu (Line quality =>) QualityMenu stretchdefmsg {stretchhandler} meshdefmsg {meshhandler} filldefmsg {fillhandler} %(redraw) {ReDraw} % for debugging ] /new DefaultMenu send def classend def /win framebuffer /new NewMathWindow send def /reshapefromuser win send {AllDefaults} win send % set it up /map win send } def makewin % remove file on destruction of window {/SaveDestroy /DestroyFrame load def /DestroyFrame { (rm ) filename append forkunix SaveDestroy } def } win send ! ) | sed -e 's/^bind //' -e 's/ bind / /' -e 's/ bind$//' | psh -------------------------------------------------------------------------------- Greg Atchity address: atchity@tc2.chem.iastate.edu