Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!amdahl!nsc!voder!wlbr!mh From: mh@wlbr.EATON.COM (Mike Hoegeman) Newsgroups: comp.windows.news Subject: Re: Why doesn't the following simple NeWS example work? Message-ID: <10135@wlbr.EATON.COM> Date: 12 Apr 88 00:31:01 GMT References: <10292@steinmetz.steinmetz.ge.com> Reply-To: mh@wlbr.UUCP (0000-Mike Hoegeman) Organization: Eaton IMS, Westlake Village, CA Lines: 53 In article <10292@steinmetz.steinmetz.ge.com> montnaro@sprite.steinmetz.ge.com (Skip Montanaro) writes: > >Below is the transcript from a psh session. Can someone tell me what the >problem is (NeWS 1.1)? > > Welcome to NeWS Version 1.1 > /msg framebuffer /new DefaultWindow send def > /reshapefromuser msg send > /map msg send > /destroy msg send > ***ERROR*** > Process: 0x24FF44 Error: killprocess > Stack: > Executing: `killprocessgroup' > At: {FrameEventMgr *`killprocessgroup'} > In: {FrameEventMgr 'null' 'ne' array{2} *'if'} > In: {DestroyFrame *DestroyClient} > In: Reading file(?,W,R) > ***** > psh: NeWS server disconnected > > Process PostScript finished Off-hand i think it's your destroy. when you do a /destroy method on a litewindow it kill's all processes in it's processgroup this includes the psh you are typing in!. to avoid this do something like this... { %% fire us up a new process group so when we destroy we don't %% zap the psh we are in along with the window newprocessgroup /msg framebuffer /new DefaultWindow send def %% modify litewin's /destroy method a bit.. { %% we gotta do this or we'll leave dangling canvases %% when we destroy! /destroy { /unmap self send /destroy super send } def } msg send /reshapefromuser msg send /map msg send /destroy msg send } fork either that or override the destroy method in litewindow w/ a subclass that does something a little less brutal.