[FIX] MVCEventSensorFixes-nk
Ned Konz
ned at squeakland.org
Wed Mar 17 02:43:04 UTC 2004
On Tuesday 16 March 2004 6:02 pm, Andreas Raab wrote:
> Good spotting! But it seems your fix is slightly out of sync
I think you're right. I'll look at it after dinner.
> - I guess it
> should just be:
>
> EventSensor>>mouseButtons
> ^self peekButtons
The only callers of mouseButtons right now (other than anyButtonPressed) are
blue/yellow/redButtonPressed; I'm a bit concerned about these tests being
called in a loop. Don't we need to make sure that the queue doesn't fill up
with mouse move events if there's a poll loop around one of these?
The other test (*Pressed) methods use primMouseButtons. I think that
anyButtonPressed should probably do that too.
Couldn't we just do this:
mouseButtons
^self primMouseButtons
and change anyButtonPressed to call primMouseButtons like all of the other
tests do?
I think we probably also should get rid of EventSensor>>buttons since it's
only used internally and could lead to the same kind of problem if polled.
> Cheers,
> - Andreas
>
> ----- Original Message -----
> From: <ned at squeakland.org>
> To: <squeak-dev at lists.squeakfoundation.org>
> Sent: Wednesday, March 17, 2004 2:48 AM
> Subject: [FIX] MVCEventSensorFixes-nk
>
> > "Change Set: MVCEventSensorFixes-nk
> > Date: 16 March 2004
> > Author: Ned Konz
> >
> > Fixes the MVC hang upon switching between views that was introduced by
> > CS 5784NoEventSensorProcess-ar.
> >
> > This was caused by waitNoButton and other tight delay loops calling
> > anyButtonPressed, which was returning mouseButtons without having a
> > chance to actually update that variable.
> >
> > "
>
> ---------------------------------------------------------------------------
>- ----
--
Ned Konz
http://bike-nomad.com/squeak/
More information about the Squeak-dev
mailing list
|