home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!torn!nott!bnrgate!bcars6a8!keithh
- From: keithh@bnr.ca (Keith Hanlan)
- Subject: Trouble with public screens
- Message-ID: <1993Jan5.192631.11275@bcars6a8.bnr.ca>
- Sender: usenet@bcars6a8.bnr.ca (Use Net)
- Nntp-Posting-Host: bcarh10f
- Organization: Bell-Northern Research Ltd., Ottawa
- Date: Tue, 5 Jan 1993 19:26:31 GMT
- Lines: 70
-
- I've written a GnuClient for the Amiga port of GnuEmacs 18.58. It does
- a number of things nice and fast but I'm currently having problems
- getting it to create a public screen that can be closed later. I'm
- using V39.106/V39.48 on an A2000/030 with SAS/C 6.1.
-
- My approach is to
- OpenScreenTags(NULL,
- SA_LikeWorkbench, TRUE,
- SA_Height, STDSCREENHEIGHT, // -1L
- SA_Width, STDSCREENWIDTH, // -1L
- SA_PubName, new_name, // "Emacs Screen"
- SA_ErrorCode, &return_code,
- SA_Depth, 2,
- NULL)
-
- which works except that I get enforcer hits WORD-READs from 0x0 and
- 0xC. Interestingly, these hits are the same as the ones I get from
- IPrefs when I am booting the machine. The hits are coming from within
- the OpenScreenTags() call itself. I'd really like to get rid of these
- hits. I originally wrote this without the V39 SA_LikeWorkbench tag
- using the long form recipe of copying pens and so forth. I got the
- same hits.
-
- After successfully opening the screen I do a
- PubScreenStatus( new_screen, 0L );
-
- which is supposed to make it a public screen and seems to work as
- well. Certainly Emacs is able to open its window successfully on this
- public screen.
-
- However, when I try to close it using another process (the client is
- transient), it fails. PSX 1.3 is also unable to close it. I'm doing
- screen = LockPubScreen( "Emacs Screen" );
-
- which works
- and
- CloseScreen(screen);
-
- which fails!!!
-
- Now the autodocs say that CloseScreen will fail (why is there no
- information return code!?) if the screen has windows. There are no
- windows however and I've even checked the screen structure's FirstWindow
- field and it is indeed NULL. It makes no difference whether my
- UnlockPubScreen() call is before or after the CloseScreen().
-
- Does anybody know what is going on?
-
- By the way, if you use GnuEmacs and have a request list send it to me
- and I'll see about adding it. Currently, my GnuClient does the
- following:
- o Opens a public screen if necessary. The name is obtained
- from an environment variable and defaults to "Emacs Screen"
- o Starts temacs itself if necessary. Replaces the Emacs
- script.
- o Does the find-file in such a way as to preserve the proper
- case of the filename so that you don't wind up with multiple
- buffers for the same file (eg <gnuclient.c> and
- <GnuClient.c>. This was the original reason I wrote the
- program.
- o It runs from the CLI or from Workbench and thus can be used
- as a tool.
- o It is residentiable.
-
- I'm also adding a hook to Emacs so that when it uniconifies, it makes
- sure that the screen is there. This is so that I can close the screen
- when its only window goes away.
-
- Your help is appreciated,
- Keith Hanlan KeithH@bnr.ca Bell-Northern Research, Ottawa, Canada 613-765-4645
-