Issue 3579 in pharo: "declare temp" adds the variable twice

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

Issue 3579 in pharo: "declare temp" adds the variable twice

pharo
Status: Accepted
Owner: [hidden email]
Labels: Milestone-1.2-DevImage

New issue 3579 by [hidden email]: "declare temp" adds the variable  
twice
http://code.google.com/p/pharo/issues/detail?id=3579

Pharo image: 1.2
Pharo core version: 12303
Virtual machine used: Squeak VM Cog 32 5.8b12
Class browser used if applicable:  OBSystemBrowserAdaptor

Steps to reproduce:
Open the browser, select a class and add a method

foo
   bar := 2

Accept, "Unknown variable: bar please correct" dialog pops up.  
Select "declare temp". Now you have:

foo
        | bar |
        | bar |                  "<- ????????"
        bar := 2


Works in PharoCore 1.2, so the problem may be related to  
OBSystemBrowserAdaptor



Reply | Threaded
Open this post in threaded view
|

Re: Issue 3579 in pharo: "declare temp" adds the variable twice

pharo

Comment #1 on issue 3579 by marianopeck: "declare temp" adds the variable  
twice
http://code.google.com/p/pharo/issues/detail?id=3579

naaaaa what a bug!  I have just tested and I can reproduce it not only in  
OBSystemBrowserAdaptor  but also with the default browser (the one it is in  
pharocore). However, in the PharoCore I cannot reproduce it.

Maybe it is related to shout and its smart characters??


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3579 in pharo: "declare temp" adds the variable twice

pharo

Comment #2 on issue 3579 by [hidden email]: "declare temp" adds the  
variable twice
http://code.google.com/p/pharo/issues/detail?id=3579

On accept and select 'declare temp':

Parser>>declareTempAndPaste:    adds the temp |bar|
(put a halt here, easy to follow)

but then EncoderForV3PlusClosures>>bindAndJuggle:  throws signal  
ReparseAfterSourceEditing and then I'm totally lost :)



Reply | Threaded
Open this post in threaded view
|

Re: Issue 3579 in pharo: "declare temp" adds the variable twice

pharo

Comment #3 on issue 3579 by marianopeck: "declare temp" adds the variable  
twice
http://code.google.com/p/pharo/issues/detail?id=3579

Laurent, I cannot reproduce it anymore in PharoCore 12319, can you?


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3579 in pharo: "declare temp" adds the variable twice

pharo

Comment #4 on issue 3579 by [hidden email]: "declare temp" adds the  
variable twice
http://code.google.com/p/pharo/issues/detail?id=3579

this is not Core, but Full (OB)


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3579 in pharo: "declare temp" adds the variable twice

pharo
Updates:
        Labels: Type-OB

Comment #5 on issue 3579 by [hidden email]: "declare temp" adds the  
variable twice
http://code.google.com/p/pharo/issues/detail?id=3579

(No comment was entered for this change.)


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3579 in pharo: "declare temp" adds the variable twice

pharo

Comment #6 on issue 3579 by marianopeck: "declare temp" adds the variable  
twice
http://code.google.com/p/pharo/issues/detail?id=3579

grrrrr yes, you are right :(


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3579 in pharo: "declare temp" adds the variable twice

pharo

Comment #7 on issue 3579 by [hidden email]: "declare temp" adds the  
variable twice
http://code.google.com/p/pharo/issues/detail?id=3579

The problem seems to be in  
OBPluggableTextMorphWithShout>>correctFrom:to:with

It's doing:

correctFrom: start to: stop with: aString
        "see the comment in #acceptTextInModel "
        unstyledAcceptText isNil ifFalse:
                [ ^unstyledAcceptText
                        replaceFrom: start
                        to: stop
                        with: aString ].
        ^ super
                correctFrom: start
                to: stop
                with: aString



Commenting this fixes the problem:

        unstyledAcceptText isNil ifFalse:
                [ ^unstyledAcceptText
                        replaceFrom: start
                        to: stop
                        with: aString ].


Does someone know if this change is ok?


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3579 in pharo: "declare temp" adds the variable twice

pharo
Updates:
        Status: Started

Comment #8 on issue 3579 by [hidden email]: "declare temp" adds the  
variable twice
http://code.google.com/p/pharo/issues/detail?id=3579

(No comment was entered for this change.)


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3579 in pharo: "declare temp" adds the variable twice

pharo
Updates:
        Status: FixProposed

Comment #9 on issue 3579 by [hidden email]: "declare temp" adds the  
variable twice
http://code.google.com/p/pharo/issues/detail?id=3579

(No comment was entered for this change.)


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3579 in pharo: "declare temp" adds the variable twice

pharo

Comment #10 on issue 3579 by [hidden email]: "declare temp" adds the  
variable twice
http://code.google.com/p/pharo/issues/detail?id=3579

What is the fix? Do you integrate it in OB?


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3579 in pharo: "declare temp" adds the variable twice

pharo

Comment #11 on issue 3579 by [hidden email]: "declare temp" adds the  
variable twice
http://code.google.com/p/pharo/issues/detail?id=3579

What is the next step to resolve this issue?


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3579 in pharo: "declare temp" adds the variable twice

pharo

Comment #12 on issue 3579 by [hidden email]: "declare temp" adds the  
variable twice
http://code.google.com/p/pharo/issues/detail?id=3579

I think that since styling is in a superclass, removing those lines will do  
it.  I'll integrate it in OB tonight.


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3579 in pharo: "declare temp" adds the variable twice

pharo
Updates:
        Status: Fixed

Comment #13 on issue 3579 by [hidden email]: "declare temp" adds the  
variable twice
http://code.google.com/p/pharo/issues/detail?id=3579

Integrated and on next Hudson build


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3579 in pharo: "declare temp" adds the variable twice

pharo
Updates:
        Status: Closed

Comment #14 on issue 3579 by [hidden email]: "declare temp" adds the  
variable twice
http://code.google.com/p/pharo/issues/detail?id=3579

verified in #149