🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

window/event/conman questions

#2576
From: rich
Date: Thu, 07 Dec 1989 03:49
35 lines
1539 bytes

I am writing a programming environment (a smalltalk that is derived from 
Tim Budd's Little Smalltalk, but faster) for Ami.  I have some questions 
about the windowing/event interface:

Normally, a program skeleton looks like this:

	w = OpenWindow(...);
	for (;;)
		{
		if (!(msg = GetMsg(w->UserPort)))
			WaitPort(w->UserPort);
		else if (handleEvent(msg))
			break;
		}

What happen if a program opens multiple windows and each one ants to wait 
for some events?  How does one code that?  

In my situation, windows are created dynamically.  For example, by the
system interface functions (or by user programs).  Does the answer(s) to
the previous question work in this situation too?

Finally, I am using ConMan's feature of opening a window as a file handle
by calling Open() with file name "con:wXXXX" where XXXX is the address of
the opened window.  I found that if I call CloseWindow() and not Close(),
the program loses some bytes each time it executes.  If the program calls 
both, then it Gurus.  Looks like the solution is to call Close() only.  Is
this a ConMan feature? or Is this a bug?

Thanks for any info.

Richard Man
	!uunet!inmet!rich
Technical Details
Message-ID: <29800002@inmet>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!inmet!rich

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!inmet!rich
From: rich@inmet.inmet.com
Newsgroups: comp.sys.amiga.tech
Subject: window/event/conman questions
Message-ID: <29800002@inmet>
Date: 7 Dec 89 03:49:00 GMT
Lines: 35
Nf-ID: #N:inmet:29800002:000:1158
Nf-From: inmet.inmet.com!rich    Dec  6 22:49:00 1989