[comp.windows.news] currentpath and setpath

zwicky@pterodactyl.cis.ohio-state.edu (Elizabeth D. Zwicky) (08/26/88)

I've been working on a program recently where I wanted to keep
some paths around to re-use them later, and trying to use "currentpath"
and "setpath". My *best* results so far have been no output.
At worst, my window system hangs. The intermediate possibility
is an "invalidaccess" error executing "pathforallvec" when I
try to do a stroke. You can get the no results effect by starting
up psh, typing executive, giving it the path of your choice
(0 0 moveto 100 100 lineto, for instance), and typing "currentpath
setpath stroke". Nothing happens. For a more impressive demonstration,
do a "10 setlinewidth", do the random path "currentpath setpath stroke"
again (producing the invalidaccess error), *and then actually draw a line*.
In the version of NeWS we run, this appears to have the result
of scaling by the linewidth. I do not have a good repeat-by for the
total hang result yet; narrowing it down is understandably slow, since
I keep having to reboot my Sun...

Is this a result of running 1.1 Beta instead of real 1.1? Am I
smoking my socks? Is NeWS smoking its socks? I know (from hacking
on printers) how to do a grody disgusting hack that fakes a
currentpath using pathforall, but I was really hoping that there would
be a clean way to do this and "currentpath" looked so good.

Elizabeth D. Zwicky
(zwicky@cis.ohio-state.edu)

rxb@ascway.UUCP (Rafael Bracho) (08/28/88)

Re:  Elizabeth D. Zwicky's message, the currentpath/setpath combination
is known not to work with stroke.  This bug has been reported to Sun and
they promised it will be fixed in the merged server.  The invalidaccess
problem with pathforallvec was just found by a member of my project this
week and we haven't reported it yet.  There is yet another problem with
currentpath/setpath and a "feature":  It seems that under some
circumstances, pointinpath causes a SIGSEV crash of the server when the
path was a saved path.  The feature is that paths saved and then
restored seem to have lost their currentpoint; this means that you can't
add to one of those paths (sigh).

					Rafael Bracho
					RXB@SPAR-20.SLB.COM