#Modula and IDCMP
3 messages in this thread
Does anyone know how to wait for a requester to finish without
using the IDCMP? I have a program with a main loop that looks for
IDCMP messages, and then calls a PROC in another module that
opens up a string requester, and uses IDCMP to wait for the
requester to finish, but then that sub-loop "swallows" some of
the messages that I would like the main IDCMP loop to get (after
the requester finishes), like NewSize. I know that this is
possible, since the AutoRequester does exactly that.
Any ideas? Thanks.
Mike 70030,160
That's an interesting problem. As far as I know (and I MAY be wrong) an IDCMP
message is the only way to get requester events. How do you know that the
AutoRequester does exactly that? Maybe it just replies to the NewSize event
without really processing it (and just letting Intuition resize the window)?
A workaround would be to call the procedure to set up and open the
requester, but then immediately return to your main loop. Then you process
further IDCMP msgs, until you get one for the open requester. Then you main
loop can call another procedure to handle it. This may not be elegant, but it
should work.
– Steve –
Rather than doing a GetMsg on the IDCMP, you can use the list manipulating
calls to look at the messages in the IDCMP port without removing them. Use the
Exec function calls on the List data structure in the MsgPort to scan through
all IntuiMessages on the port.