home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x.intrinsics
- Path: sparky!uunet!enterpoop.mit.edu!paperboy.osf.org!paperboy!drand
- From: drand@spinner.osf.org (Douglas S. Rand)
- Subject: Re: Validity of having two event loops in Xt
- In-Reply-To: as@chopper.b11.ingr.com's message of 5 Jan 93 15:10:25 GMT
- Message-ID: <DRAND.93Jan5112810@spinner.osf.org>
- Sender: news@osf.org (USENET News System)
- Organization: Open Software Foundation
- References: <1993Jan5.151025.4055@b11.b11.ingr.com>
- Date: 5 Jan 93 11:28:10
- Lines: 26
-
- In article <1993Jan5.151025.4055@b11.b11.ingr.com> as@chopper.b11.ingr.com (Anirudha Sahoo) writes:
-
- My last posting was garbled, that's why I am posting it again.
-
- I have a xclient that uses Xt. It has two event (infinite) loops. One is in
- the main routine and the other is in the Callback routine. I think it's
- definitely a bad programming style, but is it *allowed* by X standard? I am not
- very much familiar with Xt programming.
-
- You might also consider shorter lines :)
-
- You do not generally need more than one event loop in a proper
- X Toolkit program. There are definitely problems with trying to
- call XtDispatchEvent within a callback. I don't think the code
- is reentrant (This is all best of recollection, I haven't looked
- at it in awhile).
-
- You should consider one of the books on programming with the toolkit
- in order to gain some coding guidelines. I did find them quite useful
- when I was starting on the toolkit.
-
- --
- Douglas S. Rand <drand@osf.org> OSF/Motif Dev.
- Snail: 11 Cambridge Center, Cambridge, MA 02142
- Disclaimer: I don't know if OSF agrees with me... let's vote on it.
- Amateur Radio: KC1KJ
-