Input Sensor fix

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

Input Sensor fix

Michael Rueger-6
Hi all,

in the Pharo inbox there is now
Kernel-michael_rueger.renggli.304

integrated John's Mac menu fixes
fixed problems with shift cursor
fixed and cleaned up input sensor/fetcher installation

After loading the package you need to execute
InputEventSensor installPollingEventSensorFramework


Hopefully this will fix all the recent issues around input events.

Thanks to all contributors and testers!

Michael

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Input Sensor fix

Igor Stasenko
2009/4/22 Michael Rueger <[hidden email]>:

> Hi all,
>
> in the Pharo inbox there is now
> Kernel-michael_rueger.renggli.304
>
> integrated John's Mac menu fixes
> fixed problems with shift cursor
> fixed and cleaned up input sensor/fetcher installation
>
> After loading the package you need to execute
> InputEventSensor installPollingEventSensorFramework
>
>
> Hopefully this will fix all the recent issues around input events.
>
> Thanks to all contributors and testers!
>

Michael, have you adressed the potential problems , which i mentioned:

- protect a handlers collection from concurrent access
- installing a new event fetcher should preserve the list of handlers,
by taking them from the currently installed one
- ?maybe? , when installing new event fetcher, use  #become: to make
sure anything which were pointed to old fetcher will now point to a
new one.

I don't have an updated version, but i think the InputEventHandler
doesn't needs to hold a reference to the fetcher i.e. because it
creates a reference cycle (fetcher has a handler in its handlers
collection, and handler has a fetcher in its ivar).
I'd recomment to rewrite register/unregister procedure to just:

InputEventFetcher default [un]registerHandler: self

and make sure , fetcher cares about possible handler duplicates
(registering an already registered handler should be an no-op).

> Michael
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



--
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Input Sensor fix

Mariano Martinez Peck
In reply to this post by Michael Rueger-6


On Wed, Apr 22, 2009 at 10:42 AM, Michael Rueger <[hidden email]> wrote:
Hi all,

in the Pharo inbox there is now
Kernel-michael_rueger.renggli.304

integrated John's Mac menu fixes
fixed problems with shift cursor
fixed and cleaned up input sensor/fetcher installation

After loading the package you need to execute
InputEventSensor installPollingEventSensorFramework


Hopefully this will fix all the recent issues around input events.

Thanks to all contributors and testers!

I tried this and:

- Select text with shift works ok.
- Short cuts are with alt + x , alt + v instead of ctrl + x or ctrl + v
- Swap mouse button doesn't work.

Cheers,

Mariano

 

Michael

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Input Sensor fix

Michael Rueger-6
Mariano Martinez Peck wrote:

> I tried this and:
>
> - Select text with shift works ok.
> - Short cuts are with alt + x , alt + v instead of ctrl + x or ctrl + v
> - Swap mouse button doesn't work.

Thanks for testing!
OK, so another round of digging through crap...

This stuff HAS TO GO... It's piled crap on history on crap...

Michael

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Input Sensor fix

Nicolas Cellier
Yes, mining into this code is quite adventurous...
We appreciate your courage, keep on!

2009/4/22 Michael Rueger <[hidden email]>:

> Mariano Martinez Peck wrote:
>
>> I tried this and:
>>
>> - Select text with shift works ok.
>> - Short cuts are with alt + x , alt + v instead of ctrl + x or ctrl + v
>> - Swap mouse button doesn't work.
>
> Thanks for testing!
> OK, so another round of digging through crap...
>
> This stuff HAS TO GO... It's piled crap on history on crap...
>
> Michael
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Input Sensor fix

Stéphane Ducasse
In reply to this post by Michael Rueger-6
so I will integrate now. because this is important :)

Stef

On Apr 22, 2009, at 1:42 PM, Michael Rueger wrote:

> Hi all,
>
> in the Pharo inbox there is now
> Kernel-michael_rueger.renggli.304
>
> integrated John's Mac menu fixes
> fixed problems with shift cursor
> fixed and cleaned up input sensor/fetcher installation
>
> After loading the package you need to execute
> InputEventSensor installPollingEventSensorFramework
>
>
> Hopefully this will fix all the recent issues around input events.
>
> Thanks to all contributors and testers!
>
> Michael
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Input Sensor fix

Stéphane Ducasse
In reply to this post by Michael Rueger-6
mickael I loaded the kernel 304 but copy and paste does not work
Am I missing an initialize?


On Apr 22, 2009, at 9:48 PM, Michael Rueger wrote:

> Mariano Martinez Peck wrote:
>
>> I tried this and:
>>
>> - Select text with shift works ok.
>> - Short cuts are with alt + x , alt + v instead of ctrl + x or ctrl  
>> + v
>> - Swap mouse button doesn't work.
>
> Thanks for testing!
> OK, so another round of digging through crap...
>
> This stuff HAS TO GO... It's piled crap on history on crap...
>
> Michael
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Input Sensor fix

Michael Rueger-6
On Thu, Apr 23, 2009 at 10:12 AM, Stéphane Ducasse
<[hidden email]> wrote:
> mickael I loaded the kernel 304 but copy and paste does not work
> Am I missing an initialize?


> After loading the package you need to execute
> InputEventSensor installPollingEventSensorFramework

Michael

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Input Sensor fix

Stéphane Ducasse
does not work

> InputEventSensor installPollingEventSensorFramework

:(


On Apr 23, 2009, at 10:29 AM, Michael Rueger wrote:

> On Thu, Apr 23, 2009 at 10:12 AM, Stéphane Ducasse
> <[hidden email]> wrote:
>> mickael I loaded the kernel 304 but copy and paste does not work
>> Am I missing an initialize?
>
>
>> After loading the package you need to execute
>> InputEventSensor installPollingEventSensorFramework
>
> Michael
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Input Sensor fix

Igor Stasenko
After loading  kernel 304 and doing

InputEventSensor installPollingEventSensorFramework

i now having two event fetcher processes processes running, and show
in Process browser.
But image working stable and responding to input.
Both processes survived saving/loading.


i think this needs to be fixed, like in attached .cs

2009/4/23 Stéphane Ducasse <[hidden email]>:

> does not work
>
>> InputEventSensor installPollingEventSensorFramework
>
> :(
>
>
> On Apr 23, 2009, at 10:29 AM, Michael Rueger wrote:
>
>> On Thu, Apr 23, 2009 at 10:12 AM, Stéphane Ducasse
>> <[hidden email]> wrote:
>>> mickael I loaded the kernel 304 but copy and paste does not work
>>> Am I missing an initialize?
>>
>>
>>> After loading the package you need to execute
>>> InputEventSensor installPollingEventSensorFramework
>>
>> Michael
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>


--
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

event-fetcher-fix.1.cs (980 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Input Sensor fix

Igor Stasenko
and here's another changeset, which deals with:

- preserving the handlers collection when reinstalling event fetcher
- trying to play nice with the fact above in
#installEventSensorFramework: method.
- makes UserInterruptHandler to hold a singleton.

what i wanted to achieve, that reinstalling event fetcher does not
causing a list of handlers to be lost, so you don't have to rebind
them manually (suppose you have multiple different handlers, not just
UserInterruptHandler and InputEventSensor).

all of this is for your consideration..

2009/4/23 Igor Stasenko <[hidden email]>:

> After loading  kernel 304 and doing
>
> InputEventSensor installPollingEventSensorFramework
>
> i now having two event fetcher processes processes running, and show
> in Process browser.
> But image working stable and responding to input.
> Both processes survived saving/loading.
>
>
> i think this needs to be fixed, like in attached .cs
>
> 2009/4/23 Stéphane Ducasse <[hidden email]>:
>> does not work
>>
>>> InputEventSensor installPollingEventSensorFramework
>>
>> :(
>>
>>
>> On Apr 23, 2009, at 10:29 AM, Michael Rueger wrote:
>>
>>> On Thu, Apr 23, 2009 at 10:12 AM, Stéphane Ducasse
>>> <[hidden email]> wrote:
>>>> mickael I loaded the kernel 304 but copy and paste does not work
>>>> Am I missing an initialize?
>>>
>>>
>>>> After loading the package you need to execute
>>>> InputEventSensor installPollingEventSensorFramework
>>>
>>> Michael
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>


--
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

event-sensor-more-changes.1.cs (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Input Sensor fix

Stéphane Ducasse
thanks igor
I will wait that mike bundles them beofre integrating the changes.

Stef

On Apr 23, 2009, at 12:06 PM, Igor Stasenko wrote:

> and here's another changeset, which deals with:
>
> - preserving the handlers collection when reinstalling event fetcher
> - trying to play nice with the fact above in
> #installEventSensorFramework: method.
> - makes UserInterruptHandler to hold a singleton.
>
> what i wanted to achieve, that reinstalling event fetcher does not
> causing a list of handlers to be lost, so you don't have to rebind
> them manually (suppose you have multiple different handlers, not just
> UserInterruptHandler and InputEventSensor).
>
> all of this is for your consideration..
>
> 2009/4/23 Igor Stasenko <[hidden email]>:
>> After loading  kernel 304 and doing
>>
>> InputEventSensor installPollingEventSensorFramework
>>
>> i now having two event fetcher processes processes running, and show
>> in Process browser.
>> But image working stable and responding to input.
>> Both processes survived saving/loading.
>>
>>
>> i think this needs to be fixed, like in attached .cs
>>
>> 2009/4/23 Stéphane Ducasse <[hidden email]>:
>>> does not work
>>>
>>>> InputEventSensor installPollingEventSensorFramework
>>>
>>> :(
>>>
>>>
>>> On Apr 23, 2009, at 10:29 AM, Michael Rueger wrote:
>>>
>>>> On Thu, Apr 23, 2009 at 10:12 AM, Stéphane Ducasse
>>>> <[hidden email]> wrote:
>>>>> mickael I loaded the kernel 304 but copy and paste does not work
>>>>> Am I missing an initialize?
>>>>
>>>>
>>>>> After loading the package you need to execute
>>>>> InputEventSensor installPollingEventSensorFramework
>>>>
>>>> Michael
>>>>
>>>> _______________________________________________
>>>> Pharo-project mailing list
>>>> [hidden email]
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>
>>>
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko AKA sig.
>>
>
>
>
> --  
> Best regards,
> Igor Stasenko AKA sig.
> <event-sensor-more-changes.
> 1.cs>_______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Input Sensor fix

Igor Stasenko
2009/4/23 Stéphane Ducasse <[hidden email]>:
> thanks igor
> I will wait that mike bundles them beofre integrating the changes.
>
i'm still thinking that using #becomeForward: is better solution , for
refreshing an event fetcher instance.
Because you never know, who or why referencing it.

install
        "InputEventFetcher install"
        | handlers fetcher |
        Smalltalk addToStartUpList: InputEventFetcher after: Cursor.
        Smalltalk addToShutDownList: InputEventFetcher after: Form.

        fetcher := self new.
        handlers := #().
        Default ifNotNil: [
                handlers := Default eventHandlers.
                Default shutdown.
                Default becomeForward: fetcher.
        ].

        Default := fetcher.
        fetcher eventHandlers addAll: handlers.
        fetcher startUp

> Stef
>
> On Apr 23, 2009, at 12:06 PM, Igor Stasenko wrote:
>
>> and here's another changeset, which deals with:
>>
>> - preserving the handlers collection when reinstalling event fetcher
>> - trying to play nice with the fact above in
>> #installEventSensorFramework: method.
>> - makes UserInterruptHandler to hold a singleton.
>>
>> what i wanted to achieve, that reinstalling event fetcher does not
>> causing a list of handlers to be lost, so you don't have to rebind
>> them manually (suppose you have multiple different handlers, not just
>> UserInterruptHandler and InputEventSensor).
>>
>> all of this is for your consideration..
>>
>> 2009/4/23 Igor Stasenko <[hidden email]>:
>>> After loading  kernel 304 and doing
>>>
>>> InputEventSensor installPollingEventSensorFramework
>>>
>>> i now having two event fetcher processes processes running, and show
>>> in Process browser.
>>> But image working stable and responding to input.
>>> Both processes survived saving/loading.
>>>
>>>
>>> i think this needs to be fixed, like in attached .cs
>>>
>>> 2009/4/23 Stéphane Ducasse <[hidden email]>:
>>>> does not work
>>>>
>>>>> InputEventSensor installPollingEventSensorFramework
>>>>
>>>> :(
>>>>
>>>>
>>>> On Apr 23, 2009, at 10:29 AM, Michael Rueger wrote:
>>>>
>>>>> On Thu, Apr 23, 2009 at 10:12 AM, Stéphane Ducasse
>>>>> <[hidden email]> wrote:
>>>>>> mickael I loaded the kernel 304 but copy and paste does not work
>>>>>> Am I missing an initialize?
>>>>>
>>>>>
>>>>>> After loading the package you need to execute
>>>>>> InputEventSensor installPollingEventSensorFramework
>>>>>
>>>>> Michael
>>>>>
>>>>> _______________________________________________
>>>>> Pharo-project mailing list
>>>>> [hidden email]
>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Pharo-project mailing list
>>>> [hidden email]
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>
>>>
>>>
>>>
>>> --
>>> Best regards,
>>> Igor Stasenko AKA sig.
>>>
>>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko AKA sig.
>> <event-sensor-more-changes.
>> 1.cs>_______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



--
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Input Sensor fix

Igor Stasenko
Here's another cosmetic change.
I feel uncomfortable with current design, this is why i can't rest.
Of course, its better than old one.
:)


--
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

fetcher-process-naming.1.cs (644 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Input Sensor fix

Stéphane Ducasse
lol
I know the feeling :)

On Apr 23, 2009, at 12:55 PM, Igor Stasenko wrote:

> Here's another cosmetic change.
> I feel uncomfortable with current design, this is why i can't rest.
> Of course, its better than old one.
> :)
>
>
> --  
> Best regards,
> Igor Stasenko AKA sig.
> <fetcher-process-naming.
> 1.cs>_______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Input Sensor fix

Stéphane Ducasse
In reply to this post by Michael Rueger-6
I tried 306 and
InputEventSensor installPollingEventSensorFramework
But the copy and paste does not work.

Do you prefer that I integrate these changes and that you continue  
fixing
or that we wait and integrate everything at once?

Stef

On Apr 22, 2009, at 1:42 PM, Michael Rueger wrote:

> Hi all,
>
> in the Pharo inbox there is now
> Kernel-michael_rueger.renggli.304
>
> integrated John's Mac menu fixes
> fixed problems with shift cursor
> fixed and cleaned up input sensor/fetcher installation
>
> After loading the package you need to execute
> InputEventSensor installPollingEventSensorFramework
>
>
> Hopefully this will fix all the recent issues around input events.
>
> Thanks to all contributors and testers!
>
> Michael
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Input Sensor fix

Michael Rueger-6
Stéphane Ducasse wrote:
> I tried 306 and
> InputEventSensor installPollingEventSensorFramework
> But the copy and paste does not work.
>
> Do you prefer that I integrate these changes and that you continue  
> fixing
> or that we wait and integrate everything at once?

Apologies for taking so long. I'm still working (or trying to at least)
on fixes for the different problems and would like to get everything in
at once.

Really soon now!

Michael


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Input Sensor fix

Stéphane Ducasse
Hi mike

No problem. I imagine that this is not trivial :)
I just issue a release based on 306

Stef

On Apr 26, 2009, at 5:04 PM, Michael Rueger wrote:

> Stéphane Ducasse wrote:
>> I tried 306 and
>> InputEventSensor installPollingEventSensorFramework
>> But the copy and paste does not work.
>>
>> Do you prefer that I integrate these changes and that you continue
>> fixing
>> or that we wait and integrate everything at once?
>
> Apologies for taking so long. I'm still working (or trying to at  
> least)
> on fixes for the different problems and would like to get everything  
> in
> at once.
>
> Really soon now!
>
> Michael
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project