🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #10832

Re: Two programs using same window?

#10832
From: Matt Dillon
Date: Fri, 06 Jan 1989 04:24
28 lines
1680 bytes
>	Here's what I want to do.  Program X starts up, opens a 
>custom screen and perhaps a window, and then Execute()'s another
>program Y.  I wish for Y to write into the window opened by X
>(or, alternatively, Y can open a window and attach it to X's screen
>and "inherit" (for want of a better term) X's screen's info).
>	Is this possible?  Can Y find X's screen/window and use it?  Is
>it dangerous?  I suppose I could have Y open it's own screen but
>I prefer it this way ... oh, I'm using Manx C if that's any help.
>	Apologies if this isn't techie enough for .tech.
>
>	Thanks,
>	Brian Russ

	Set X's process->pr_ConsoleTask to the console handler for the new
window.  This will also involved openning the console device for that window.
In your Execute() call, redirect stdin and stdout to *:  "program >* <* ..."
That ought to do it.  I haven't tested this.

	Dangerous?  Make sure Y has a valid file-handle reference to the
console device or you *will* be in big trouble!  That is, setting the
process->pr_ConsoleTask alone does not bump the reference count in any
way, shape, or form.  Better to have X make sure Y has died before closing
the console device and window.  Specifically, do not CloseWindow() the window
unless you are sure nobody is using it!

	
						-Matt
Technical Details
Message-ID: <8901060424.AA22744@postgres.Berkeley.EDU>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-ncis!helios.ee.lbl.gov!pasteur!ucbvax!POSTGRES.BERKELEY.EDU!dillon

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-ncis!helios.ee.lbl.gov!pasteur!ucbvax!POSTGRES.BERKELEY.EDU!dillon
From: dillon@POSTGRES.BERKELEY.EDU (Matt Dillon)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Two programs using same window?
Message-ID: <8901060424.AA22744@postgres.Berkeley.EDU>
Date: 6 Jan 89 04:24:12 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Lines: 28