problem with TextMorph>>handleInteraction:fromEvent:

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

problem with TextMorph>>handleInteraction:fromEvent:

EstebanLM
Hi,
I'm working to make Algernon works on pharo, and I found what seems to
be a bug (or at least something that "revesls" a bug), in
TextMorph>>handleInteraction:
This is what happens: the Algernon starts and you type a class, then go
inside to look for a method, and that sends a keyStroke: to a new
TextMorph, who sends a #handleInteraction:fromEvent:.
So... old implementation on #handleInteraction:fromEvent: had a first
line removed in new implementation:

        self editor sensor: (KeyboardBuffer new startingEvent: evt).


The problem is this: #editor message instances editor attribute if nil.
Now... that line is not anymore, introducing a DNU when sending a
subsecuent message to editor attribute.
I "solved" it bu changing this line:

        oldEditor := editor.


for this other:

        oldEditor := self editor.


(who restores the editor instantiation).

What I don't know is:

a) is this a bug?
b) the bug is there or is a collateral damage?
c) my hack really solves the problem?
d) is possible to introduce this bugfix into a new version?

Cheers,
Esteban



_______________________________________________
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: problem with TextMorph>>handleInteraction:fromEvent:

EstebanLM
Ouch, bad method, please replace: #handleInteraction:fromEvent: (the
squeak event), for #handleInteraction: (the pharo equivallent)

Cheers,
Esteban

On 2009-07-12 11:22:47 -0300, Esteban Lorenzano
<[hidden email]> said:

> Hi,
> I'm working to make Algernon works on pharo, and I found what seems to
> be a bug (or at least something that "revesls" a bug), in
> TextMorph>>handleInteraction:
> This is what happens: the Algernon starts and you type a class, then go
> inside to look for a method, and that sends a keyStroke: to a new
> TextMorph, who sends a #handleInteraction:fromEvent:.
> So... old implementation on #handleInteraction:fromEvent: had a first
> line removed in new implementation:
>
> self editor sensor: (KeyboardBuffer new startingEvent: evt).
>
>
> The problem is this: #editor message instances editor attribute if nil.
> Now... that line is not anymore, introducing a DNU when sending a
> subsecuent message to editor attribute.
> I "solved" it bu changing this line:
>
> oldEditor := editor.
>
>
> for this other:
>
> oldEditor := self editor.
>
>
> (who restores the editor instantiation).
>
> What I don't know is:
>
> a) is this a bug?
> b) the bug is there or is a collateral damage?
> c) my hack really solves the problem?
> d) is possible to introduce this bugfix into a new version?
>
> Cheers,
> Esteban




_______________________________________________
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: problem with TextMorph>>handleInteraction:fromEvent:

Stéphane Ducasse
do you have a cs?

Stef

On Jul 12, 2009, at 4:25 PM, Esteban Lorenzano wrote:

> Ouch, bad method, please replace: #handleInteraction:fromEvent: (the
> squeak event), for #handleInteraction: (the pharo equivallent)
>
> Cheers,
> Esteban
>
> On 2009-07-12 11:22:47 -0300, Esteban Lorenzano
> <[hidden email]> said:
>
>> Hi,
>> I'm working to make Algernon works on pharo, and I found what seems  
>> to
>> be a bug (or at least something that "revesls" a bug), in
>> TextMorph>>handleInteraction:
>> This is what happens: the Algernon starts and you type a class,  
>> then go
>> inside to look for a method, and that sends a keyStroke: to a new
>> TextMorph, who sends a #handleInteraction:fromEvent:.
>> So... old implementation on #handleInteraction:fromEvent: had a first
>> line removed in new implementation:
>>
>> self editor sensor: (KeyboardBuffer new startingEvent: evt).
>>
>>
>> The problem is this: #editor message instances editor attribute if  
>> nil.
>> Now... that line is not anymore, introducing a DNU when sending a
>> subsecuent message to editor attribute.
>> I "solved" it bu changing this line:
>>
>> oldEditor := editor.
>>
>>
>> for this other:
>>
>> oldEditor := self editor.
>>
>>
>> (who restores the editor instantiation).
>>
>> What I don't know is:
>>
>> a) is this a bug?
>> b) the bug is there or is a collateral damage?
>> c) my hack really solves the problem?
>> d) is possible to introduce this bugfix into a new version?
>>
>> Cheers,
>> Esteban
>
>
>
>
> _______________________________________________
> 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: problem with TextMorph>>handleInteraction:fromEvent:

Michael Rueger-6
In reply to this post by EstebanLM
On Sun, Jul 12, 2009 at 4:22 PM, Esteban Lorenzano<[hidden email]> wrote:

> What I don't know is:
>
> a) is this a bug?
> b) the bug is there or is a collateral damage?
> c) my hack really solves the problem?
> d) is possible to introduce this bugfix into a new version?

This part was refactored, the variable editor shouldn't be used anymore IIRC.

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: problem with TextMorph>>handleInteraction:fromEvent:

Stéphane Ducasse
In reply to this post by EstebanLM
in TextMorph I do not see this method

On Jul 12, 2009, at 4:25 PM, Esteban Lorenzano wrote:

> Ouch, bad method, please replace: #handleInteraction:fromEvent: (the
> squeak event), for #handleInteraction: (the pharo equivallent)
>
> Cheers,
> Esteban
>
> On 2009-07-12 11:22:47 -0300, Esteban Lorenzano
> <[hidden email]> said:
>
>> Hi,
>> I'm working to make Algernon works on pharo, and I found what seems  
>> to
>> be a bug (or at least something that "revesls" a bug), in
>> TextMorph>>handleInteraction:
>> This is what happens: the Algernon starts and you type a class,  
>> then go
>> inside to look for a method, and that sends a keyStroke: to a new
>> TextMorph, who sends a #handleInteraction:fromEvent:.
>> So... old implementation on #handleInteraction:fromEvent: had a first
>> line removed in new implementation:
>>
>> self editor sensor: (KeyboardBuffer new startingEvent: evt).
>>
>>
>> The problem is this: #editor message instances editor attribute if  
>> nil.
>> Now... that line is not anymore, introducing a DNU when sending a
>> subsecuent message to editor attribute.
>> I "solved" it bu changing this line:
>>
>> oldEditor := editor.
>>
>>
>> for this other:
>>
>> oldEditor := self editor.
>>
>>
>> (who restores the editor instantiation).
>>
>> What I don't know is:
>>
>> a) is this a bug?
>> b) the bug is there or is a collateral damage?
>> c) my hack really solves the problem?
>> d) is possible to introduce this bugfix into a new version?
>>
>> Cheers,
>> Esteban
>
>
>
>
> _______________________________________________
> 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: problem with TextMorph>>handleInteraction:fromEvent:

Stéphane Ducasse
In reply to this post by Michael Rueger-6
Oops I checked and the code is full of editor direct accesses

Stef

On Jul 12, 2009, at 5:06 PM, Michael Rueger wrote:

> On Sun, Jul 12, 2009 at 4:22 PM, Esteban  
> Lorenzano<[hidden email]> wrote:
>
>> What I don't know is:
>>
>> a) is this a bug?
>> b) the bug is there or is a collateral damage?
>> c) my hack really solves the problem?
>> d) is possible to introduce this bugfix into a new version?
>
> This part was refactored, the variable editor shouldn't be used  
> anymore IIRC.
>
> 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: problem with TextMorph>>handleInteraction:fromEvent:

EstebanLM
In reply to this post by EstebanLM
Hi,
is just #handleInteraction: in pharo (my mistake)
I'm uploading a changeset.

Cheers,
Esteban




On 2009-07-12 12:58:42 -0300, Stéphane Ducasse <[hidden email]> said:

in TextMorph I do not see this method

On Jul 12, 2009, at 4:25 PM, Esteban Lorenzano wrote:

Ouch, bad method, please replace: #handleInteraction:fromEvent: (the
squeak event), for #handleInteraction: (the pharo equivallent)

Cheers,
Esteban

On 2009-07-12 11:22:47 -0300, Esteban Lorenzano

Hi,
I'm working to make Algernon works on pharo, and I found what seems  
to
be a bug (or at least something that "revesls" a bug), in
TextMorph>>handleInteraction:
This is what happens: the Algernon starts and you type a class,  
then go
inside to look for a method, and that sends a keyStroke: to a new
TextMorph, who sends a #handleInteraction:fromEvent:.
So... old implementation on #handleInteraction:fromEvent: had a first
line removed in new implementation:

self editor sensor: (KeyboardBuffer new startingEvent: evt).


The problem is this: #editor message instances editor attribute if  
nil.
Now... that line is not anymore, introducing a DNU when sending a
subsecuent message to editor attribute.
I "solved" it bu changing this line:

oldEditor := editor.


for this other:

oldEditor := self editor.


(who restores the editor instantiation).

What I don't know is:

a) is this a bug?
b) the bug is there or is a collateral damage?
c) my hack really solves the problem?
d) is possible to introduce this bugfix into a new version?

Cheers,
Esteban




_______________________________________________
Pharo-project mailing list


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

TextMorphFix.1.cs (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: problem with TextMorph>>handleInteraction:fromEvent:

EstebanLM
In reply to this post by Michael Rueger-6
On 2009-07-12 12:06:46 -0300, Michael Rueger
<[hidden email]> said:

> On Sun, Jul 12, 2009 at 4:22 PM, Esteban
> Lorenzano<[hidden email]> wrote:
>
>> What I don't know is:
>>
>> a) is this a bug?
>> b) the bug is there or is a collateral damage?
>> c) my hack really solves the problem?
>> d) is possible to introduce this bugfix into a new version?
>
> This part was refactored, the variable editor shouldn't be used anymore IIRC.
>
> Michael

But there are several places in TextMorph using it :(




_______________________________________________
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: problem with TextMorph>>handleInteraction:fromEvent:

Stéphane Ducasse
In reply to this post by EstebanLM
Thanks I was doing the same.
Can you chekc the next update and let me know?

Stef

On Jul 12, 2009, at 6:12 PM, Esteban Lorenzano wrote:

> Hi,
> is just #handleInteraction: in pharo (my mistake)
> I'm uploading a changeset.
>
> Cheers,
> Esteban
>
> <TextMorphFix.1.cs>
>
>
> On 2009-07-12 12:58:42 -0300, Stéphane Ducasse <[hidden email]
> > said:
>
> in TextMorph I do not see this method
>
> On Jul 12, 2009, at 4:25 PM, Esteban Lorenzano wrote:
>
> Ouch, bad method, please replace: #handleInteraction:fromEvent: (the
> squeak event), for #handleInteraction: (the pharo equivallent)
>
> Cheers,
> Esteban
>
> On 2009-07-12 11:22:47 -0300, Esteban Lorenzano
> <[hidden email]> said:
>
> Hi,
> I'm working to make Algernon works on pharo, and I found what seems
> to
> be a bug (or at least something that "revesls" a bug), in
> TextMorph>>handleInteraction:
> This is what happens: the Algernon starts and you type a class,
> then go
> inside to look for a method, and that sends a keyStroke: to a new
> TextMorph, who sends a #handleInteraction:fromEvent:.
> So... old implementation on #handleInteraction:fromEvent: had a first
> line removed in new implementation:
>
> self editor sensor: (KeyboardBuffer new startingEvent: evt).
>
>
> The problem is this: #editor message instances editor attribute if
> nil.
> Now... that line is not anymore, introducing a DNU when sending a
> subsecuent message to editor attribute.
> I "solved" it bu changing this line:
>
> oldEditor := editor.
>
>
> for this other:
>
> oldEditor := self editor.
>
>
> (who restores the editor instantiation).
>
> What I don't know is:
>
> a) is this a bug?
> b) the bug is there or is a collateral damage?
> c) my hack really solves the problem?
> d) is possible to introduce this bugfix into a new version?
>
> Cheers,
> Esteban
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project-bM+ny+RY8h+a+bCvCPl5/[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


_______________________________________________
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: problem with TextMorph>>handleInteraction:fromEvent:

EstebanLM
Seems to be working :)
I'll upload a "pharo compatible" algernon version, then

Cheers,
Esteban

On 2009-07-12 13:29:23 -0300, Stéphane Ducasse
<[hidden email]> said:

> Thanks I was doing the same.
> Can you chekc the next update and let me know?
>
> Stef
>
> On Jul 12, 2009, at 6:12 PM, Esteban Lorenzano wrote:
>
>> Hi,
>> is just #handleInteraction: in pharo (my mistake)
>> I'm uploading a changeset.
>>
>> Cheers,
>> Esteban
>>
>> <TextMorphFix.1.cs>
>>
>>
>> On 2009-07-12 12:58:42 -0300, Stéphane Ducasse <stephane.ducasse-MZpvjP
> [hidden email]
>
>>> said:
>>
>> in TextMorph I do not see this method
>>
>> On Jul 12, 2009, at 4:25 PM, Esteban Lorenzano wrote:
>>
>> Ouch, bad method, please replace: #handleInteraction:fromEvent: (the
>> squeak event), for #handleInteraction: (the pharo equivallent)
>>
>> Cheers,
>> Esteban
>>
>> On 2009-07-12 11:22:47 -0300, Esteban Lorenzano
>> <[hidden email]>
>> said:
>>
>> Hi,
>> I'm working to make Algernon works on pharo, and I found what seems
>> to
>> be a bug (or at least something that "revesls" a bug), in
>> TextMorph>>handleInteraction:
>> This is what happens: the Algernon starts and you type a class,
>> then go
>> inside to look for a method, and that sends a keyStroke: to a new
>> TextMorph, who sends a #handleInteraction:fromEvent:.
>> So... old implementation on #handleInteraction:fromEvent: had a first
>> line removed in new implementation:
>>
>> self editor sensor: (KeyboardBuffer new startingEvent: evt).
>>
>>
>> The problem is this: #editor message instances editor attribute if
>> nil.
>> Now... that line is not anymore, introducing a DNU when sending a
>> subsecuent message to editor attribute.
>> I "solved" it bu changing this line:
>>
>> oldEditor := editor.
>>
>>
>> for this other:
>>
>> oldEditor := self editor.
>>
>>
>> (who restores the editor instantiation).
>>
>> What I don't know is:
>>
>> a) is this a bug?
>> b) the bug is there or is a collateral damage?
>> c) my hack really solves the problem?
>> d) is possible to introduce this bugfix into a new version?
>>
>> Cheers,
>> Esteban
>>
>>
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project-bM+ny+RY8h+a+bCvCPl5/[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




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