Double Click fix

View: New views
4 Messages — Rating Filter:   Alert me  

Double Click fix

by Michael Rueger-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

attached a fix for the click-double click problem.

You need to wait for another fix (cleanup for multiple event waits) Bert
is working on right now for this to work reliably.
Unless you are willing to wait for a full garbage collect between mouse
clicks ;-)

Michael


_______________________________________________
Tweak mailing list
Tweak@...
http://impara.de/mailman/listinfo/tweak

CPrimitiveCostume-waitForClicksOrDragevent.st.gz (1K) Download Attachment

[FIX] waitUntilAnyOf: releases only first observer

by Bert Freudenberg-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am 12.07.2006 um 17:38 schrieb Michael Rueger:

> Hi all,
>
> attached a fix for the click-double click problem.
>
> You need to wait for another fix (cleanup for multiple event waits)  
> Bert is working on right now for this to work reliably.
> Unless you are willing to wait for a full garbage collect between  
> mouse clicks ;-)
>
> Michael
> <CPrimitiveCostume-waitForClicksOrDragevent.st.gz>

Here's the promised fix:

        http://bugs.impara.de/view.php?id=4241

The problem can be seen here:

        o := CObject new.
        o startScript: [
                duringMy := o handlesEvent: #myEvent.
                duringOther := o handlesEvent: #otherEvent.
                o signal: #myEvent].
        beforeMy := o handlesEvent: #myEvent.
        beforeOther := o handlesEvent: #otherEvent.
        o waitUntilAnyOf: {
                o. #myEvent.
                o. #otherEvent.}.
        afterMy := o handlesEvent: #myEvent.
        afterOther := o handlesEvent: #otherEvent.
        {#myEvent->beforeMy -> duringMy -> afterMy.
        #otherEvent->beforeOther -> duringOther -> afterOther}.

This prints

         #(#myEvent->false->true->false
        #otherEvent->false->true->true)

before and

         #(#myEvent->false->true->false
        #otherEvent->false->true->false)

after my fix.

- Bert-
_______________________________________________
Tweak mailing list
Tweak@...
http://impara.de/mailman/listinfo/tweak

Re: [FIX] waitUntilAnyOf: releases only first observer

by Andreas Raab :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Looks good to me. Just put the fixes into the repository.

Cheers,
   - Andreas

Bert Freudenberg wrote:

> Am 12.07.2006 um 17:38 schrieb Michael Rueger:
>
>> Hi all,
>>
>> attached a fix for the click-double click problem.
>>
>> You need to wait for another fix (cleanup for multiple event waits)
>> Bert is working on right now for this to work reliably.
>> Unless you are willing to wait for a full garbage collect between
>> mouse clicks ;-)
>>
>> Michael
>> <CPrimitiveCostume-waitForClicksOrDragevent.st.gz>
>
> Here's the promised fix:
>
>     http://bugs.impara.de/view.php?id=4241
>
> The problem can be seen here:
>
>     o := CObject new.
>     o startScript: [
>         duringMy := o handlesEvent: #myEvent.
>         duringOther := o handlesEvent: #otherEvent.
>         o signal: #myEvent].
>     beforeMy := o handlesEvent: #myEvent.
>     beforeOther := o handlesEvent: #otherEvent.
>     o waitUntilAnyOf: {
>         o. #myEvent.
>         o. #otherEvent.}.
>     afterMy := o handlesEvent: #myEvent.
>     afterOther := o handlesEvent: #otherEvent.
>     {#myEvent->beforeMy -> duringMy -> afterMy.
>     #otherEvent->beforeOther -> duringOther -> afterOther}.
>
> This prints
>
>      #(#myEvent->false->true->false
>     #otherEvent->false->true->true)
>
> before and
>
>      #(#myEvent->false->true->false
>     #otherEvent->false->true->false)
>
> after my fix.
>
> - Bert-
> _______________________________________________
> Tweak mailing list
> Tweak@...
> http://impara.de/mailman/listinfo/tweak
>
>
_______________________________________________
Tweak mailing list
Tweak@...
http://impara.de/mailman/listinfo/tweak

Re: [FIX] waitUntilAnyOf: releases only first observer

by Steven W Riggins :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You guys are like rock stars.

On Jul 12, 2006, at 8:55 AM, Bert Freudenberg wrote:

> Am 12.07.2006 um 17:38 schrieb Michael Rueger:
>
>> Hi all,
>>
>> attached a fix for the click-double click problem.
>>
>> You need to wait for another fix (cleanup for multiple event  
>> waits) Bert is working on right now for this to work reliably.
>> Unless you are willing to wait for a full garbage collect between  
>> mouse clicks ;-)
>>
>> Michael
>> <CPrimitiveCostume-waitForClicksOrDragevent.st.gz>
>
> Here's the promised fix:
>
> http://bugs.impara.de/view.php?id=4241
>
> The problem can be seen here:
>
> o := CObject new.
> o startScript: [
> duringMy := o handlesEvent: #myEvent.
> duringOther := o handlesEvent: #otherEvent.
> o signal: #myEvent].
> beforeMy := o handlesEvent: #myEvent.
> beforeOther := o handlesEvent: #otherEvent.
> o waitUntilAnyOf: {
> o. #myEvent.
> o. #otherEvent.}.
> afterMy := o handlesEvent: #myEvent.
> afterOther := o handlesEvent: #otherEvent.
> {#myEvent->beforeMy -> duringMy -> afterMy.
> #otherEvent->beforeOther -> duringOther -> afterOther}.
>
> This prints
>
> #(#myEvent->false->true->false
> #otherEvent->false->true->true)
>
> before and
>
> #(#myEvent->false->true->false
> #otherEvent->false->true->false)
>
> after my fix.
>
> - Bert-
> _______________________________________________
> Tweak mailing list
> Tweak@...
> http://impara.de/mailman/listinfo/tweak
>

_______________________________________________
Tweak mailing list
Tweak@...
http://impara.de/mailman/listinfo/tweak