[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl-Toolbox] forwarding events



On Fri, 9 Jul 1999 11:52:40 +0100, Alan Fry wrote:

>That line is incorrect -- you have to use the bit-wise '&' to test if the
>'128' bit is set, like:
>
>    unless ($event->modifiers & 128 == 128) {

That's a bit verbose. Binary and with 128 will either return 128 (true),
or 0 (false). Thus, the "== 128" part may be dropped.

    unless ($event->modifiers & 128) {

	Bart.

==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-toolbox-request@macperl.org