C (198/207)

From:Ben Hutchings
Date:29 Dec 99 at 19:21:48
Subject:Re: Re: event handling problem

From: Ben Hutchings <womble@zzumbouk.demon.co.uk>

On Sun, Dec 26, 1999 at 10:31:19PM -0500, Bob Lanham wrote:
<snip>
> Thanks for the tip regarding break/return. It gave me the idea of
> replying to any and all messages at the top, before going into the
> switch block, and only dealing with a single possible message. It
> works!
>
> message = (struct IntuiMessage *)GetMsg(win->UserPort);
> mclass = message->Class;
> code = message->Code;
>
> // reply to all messages
> while (NULL != (message = (struct IntuiMessage
> *)GetMsg(win->UserPort)))
> ReplyMsg((struct Message *)message);
<snip>

But this code throws away all the other messages. You don't want to
do that.



Ben Hutchings - womble@zzumbouk.demon.co.uk, http://www.zzumbouk.demon.co.uk
Team *AMIGA* | Jay Miner Society | Linux - the choice of a GNU generation
friends: People who know you well, but like you anyway.