C (60/254)

From:Andrew Bell
Date:11 Apr 00 at 16:46:06
Subject:Re: GadTools event loop problem

Hi Stephen,

On 10-Apr-00 you wrote: [amiga-c] Re: GadTools event loop problem

> Your code contains the following.
>
> Wait (1 << mywin->UserPort->mp_SigBit);
>
> To wait for more than one event simply bitwise OR different wait
> events together
>
> Wait (
> 1 << mywin->UserPort->mp_SigBit
> | 1 << totherwin->UserPort->mp_SigBit
> );
>
> (BTW, You can combine anything in the Wait() - Rexx Events, Timer
> Events, Commodity Events, and so forth.)
>
> Once the OS returns control to your program, you need to know where
> the event occured. We can do this by saving the result from Wait()
> and bitwise ANDing it with the shifted SigBits, and running the
> appropriate code for that window.

The problem with this solution is that you can easily run out of
signal bits in your task because each window allocates it's own IDCMP
port.

Regards, Andrew Bell.



+----------------------------------------+
email: mailto:andrew.ab2000@bigfoot.com
web: http://www.andrewb.exl.co.uk
+----------------------------------------+
You tell 'em Piano, you're upright and square.

------------------------------------------------------------------------
High rates giving you headaches? The 0% APR Introductory Rate from
Capital One. 9.9% Fixed thereafter!
http://click.egroups.com/1/3010/1/_/451227/_/955468840/
------------------------------------------------------------------------