Article View: comp.sys.amiga.tech
Article #8067Re: ===> Need help with two problems <===
From: Lamonte Koop
Date: Thu, 24 Jan 1991 04:16
Date: Thu, 24 Jan 1991 04:16
44 lines
2648 bytes
2648 bytes
greenwoode@merrimack.edu (Ed Greenwood) writes:
>
>Hi,
>
> I am writing a application program in C that uses the mouse,
>gadgets, a printer, and the disk drive. Most of the program
>consists of fixed screens such as graphs or menus. I currently
>have two unrelated problems. First, if I insert or remove a disk
>while the program is running, it doesn't sound right. Is there
>something that I must do in my program to use the disk drive?
Could you elaborate more? What do you mean "it doesn't sound right".
>My second question involves reading the mouse with IDCMP flags.
>I am trying to read a users input from a menu that is on the full
>screen. Unless I press the mouse button very slowly, I seem to
>get "ahead of it". In other words, If I press the button fast
>on option number one six times, and then press it on option two,
>the program continues reading the mouse as if I were still
>selecting option number one for two to three more presses. I
>would greatly appreciate any comments or suggestions.
That sounds normal. You must remember that the messages you are processing in
a Window's UserPort [a message port] are queued. They can "back up", in other
words. When you are pressing the mouse button quickly on option 1, these
messages from Intuition are piling up at the UserPort, while your code is
attempting to get them, using GetMsg(), and then reply to them (ReplyMsg()),
and move on to the next message [and any intermediate processing]. GetMsg()
pulls the messages from the UserPort (or any port) on a First In First Out
basis, so you don't get to the last message in the list until the ones before
it are processed.
>
> Thanks,
>
> Ed Greenwood
LaMonte Koop
Internet: lkoop@pnet01.cts.com ARPA: crash!pnet01!lkoop@nosc.mil
UUCP: {hplabs!hp-sdd ucsd nosc}!crash!pnet01!lkoop
A scientist is one who finds interest in the kinetic energy of Jell-O
moving at ridiculous velocities...an engineer is one who can find a
real-life application for such silliness.
Technical Details
Message-ID:
<7174@crash.cts.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!jarthur!ucivax!orion.oac.uci.edu!ucsd!nosc!crash!pnet01!lkoopShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!jarthur!ucivax!orion.oac.uci.edu!ucsd!nosc!crash!pnet01!lkoop From: lkoop@pnet01.cts.com (Lamonte Koop) Newsgroups: comp.sys.amiga.tech Subject: Re: ===> Need help with two problems <=== Message-ID: <7174@crash.cts.com> Date: 24 Jan 91 04:16:01 GMT Sender: root@crash.cts.com Organization: People-Net [pnet01], El Cajon CA Lines: 44