[comp.sys.amiga] Problem with requester in my program. Help!

grx1042@uoft02.utoledo.edu (Steve Snodgrass) (07/30/90)

I've written a program that uses a requester and I'm having a bit of a problem.
The requester consists of 4 gadgets, all of which are ENDGADGETs.  It appears
in a window containing some other gadgets.  It is triggered by a gadget
activation in the window.  The problem: when 2 rapied gadget picks are grouped
together, the first one calling up the requester, the program gets confused and
thinks the user has picked one of the requester gadgets.  It procedes on
through the program, and my window gets closed by the program, leaving this
requester sitting in thin air.  How can I prevent this?  I've even got a loop
right before the requester designed to clear the message port, of the form:

while (msg = GetMsg(wind->UserPort)) {
    ReplyMsg(msg);
    }

Help!!   Thanks in advance. 

 Steve Snodgrass - Ph'ran |SUBTEC - Student Union Board Technical Services|
Green Rider of Telgar Weyr|Turbosound - the only way to fly.    TMS-4     |
--------------------------|-----------------------------------------------|
GRX1042@uoft02.utoledo.edu|"It had limited capability, with a mere hundred|
GRX1042@uoft02.BITNET     | thousand gigabytes of RAM" -Jack L. Chalker   |
"Who explains the dreams we know/Carry us through from day to day" -me

lclausen@lckaos.UUCP (Lars R. Clausen) (08/02/90)

>In article <1990Jul30.001403.1301@uoft02.utoledo.edu> grx1042@uoft02.utoledo.edu (Steve Snodgrass) writes:
>I've written a program that uses a requester and I'm having a bit of a problem.
>The requester consists of 4 gadgets, all of which are ENDGADGETs.  It appears
>in a window containing some other gadgets.  It is triggered by a gadget
>activation in the window.  The problem: when 2 rapied gadget picks are grouped
>together, the first one calling up the requester, the program gets confused and
>thinks the user has picked one of the requester gadgets.  It procedes on
>through the program, and my window gets closed by the program, leaving this
>requester sitting in thin air.  How can I prevent this?  I've even got a loop

Try using the REQVERIFY IDCMP flag. You get an IntuiMessage, when Intuition
wants to set up a requester, and it will wait for a Reply() before setting
it up. In the meantime you can clean out the Messages in peace.

--
+-----------------------------------------------------+---------------+
| Lars R. Clausen                (Fido: 2:230/22.34)  |    \S\        |
| ..{pyramid|rutgers}!cbmvax!cbmehq!lckaos!lclausen   |  Thi\O\space  |
|		--==<< 42 >>==--		      |   for\L\ale   |
| the answer to the question of life, universe & *.*  |       \D\     |
+-----------------------------------------------------+---------------+
|    I don't even have an employer whose opinions these could be!     |
+---------------------------------------------------------------------+