bad bracket autocompletion in Pharo Core 1.2

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

bad bracket autocompletion in Pharo Core 1.2

Guillermo Polito
http://code.google.com/p/pharo/issues/detail?id=3069

if you type:

[] -> []]

() -> ())

{} -> {}}


Bye!

_______________________________________________
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: bad bracket autocompletion in Pharo Core 1.2

Mariano Martinez Peck
I detected a similar problem:

once you type an opening parenthesis, and then something else, it adds a new one at the END of the code

check http://code.google.com/p/pharo/issues/detail?id=2939

2010/10/6 Guillermo Polito <[hidden email]>
http://code.google.com/p/pharo/issues/detail?id=3069

if you type:

[] -> []]

() -> ())

{} -> {}}


Bye!

_______________________________________________
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: bad bracket autocompletion in Pharo Core 1.2

Guillermo Polito
Yes, the issue can be reduced to:

open parenthesis (or brackets), then something else (anywhere in the editor).

2010/10/6 Mariano Martinez Peck <[hidden email]>
I detected a similar problem:

once you type an opening parenthesis, and then something else, it adds a new one at the END of the code

check http://code.google.com/p/pharo/issues/detail?id=2939

2010/10/6 Guillermo Polito <[hidden email]>
http://code.google.com/p/pharo/issues/detail?id=3069

if you type:

[] -> []]

() -> ())

{} -> {}}


Bye!

_______________________________________________
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


_______________________________________________
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: bad bracket autocompletion in Pharo Core 1.2

Guillermo Polito
Here is the piece of code that's behaving weird

TextEditor>>dispatchOn:

...
...
char := aKeyboardEvent keyCharacter.
     openers := '([{'. 
    closers := ')]}'.
       ( closers includes: char) ifTrue: [ self blinkPrevParen: char ].
       result := self normalCharacter: aKeyboardEvent.
       (self class autoEnclose and: [ openers includes: char ])  not ifTrue: [ ^ result  ].
    suffix := closers at: (openers indexOf: char).
    paragraph text append: suffix asString.
      self moveCursor: [ : position | position  ] forward: true specialBlock: [ : pos | "no special behavior" ] event: aKeyboardEvent .
    self userHasEdited.

-------------------------------------

So, if I evaluate "TextEditor autoEnclose: false", it is stops behaving like that :)

What should be the desired behavior?  Having it configurable as it is today but fix the strange bracket adding? remove this behavior?
I can't find now how ParagraphEditor did this.

Guille

On Wed, Oct 6, 2010 at 10:34 PM, Guillermo Polito <[hidden email]> wrote:
Yes, the issue can be reduced to:

open parenthesis (or brackets), then something else (anywhere in the editor).

2010/10/6 Mariano Martinez Peck <[hidden email]>

I detected a similar problem:

once you type an opening parenthesis, and then something else, it adds a new one at the END of the code

check http://code.google.com/p/pharo/issues/detail?id=2939

2010/10/6 Guillermo Polito <[hidden email]>
http://code.google.com/p/pharo/issues/detail?id=3069

if you type:

[] -> []]

() -> ())

{} -> {}}


Bye!

_______________________________________________
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



_______________________________________________
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: bad bracket autocompletion in Pharo Core 1.2

Stéphane Ducasse
In reply to this post by Guillermo Polito

- first having no bug
- second make it better


Stef
On Oct 9, 2010, at 5:38 AM, Guillermo Polito wrote:

> Here is the piece of code that's behaving weird
>
> TextEditor>>dispatchOn:
>
> ...
> ...
> char := aKeyboardEvent keyCharacter.
>      openers := '([{'.  
>     closers := ')]}'.
>        ( closers includes: char) ifTrue: [ self blinkPrevParen: char ].
>        result := self normalCharacter: aKeyboardEvent.
>        (self class autoEnclose and: [ openers includes: char ])  not ifTrue: [ ^ result  ].
>     suffix := closers at: (openers indexOf: char).
>     paragraph text append: suffix asString.
>       self moveCursor: [ : position | position  ] forward: true specialBlock: [ : pos | "no special behavior" ] event: aKeyboardEvent .
>     self userHasEdited.
>
> -------------------------------------
>
> So, if I evaluate "TextEditor autoEnclose: false", it is stops behaving like that :)
>
> What should be the desired behavior?  Having it configurable as it is today but fix the strange bracket adding? remove this behavior?
> I can't find now how ParagraphEditor did this.
>
> Guille
>
> On Wed, Oct 6, 2010 at 10:34 PM, Guillermo Polito <[hidden email]> wrote:
> Yes, the issue can be reduced to:
>
> open parenthesis (or brackets), then something else (anywhere in the editor).
>
> 2010/10/6 Mariano Martinez Peck <[hidden email]>
>
> I detected a similar problem:
>
> once you type an opening parenthesis, and then something else, it adds a new one at the END of the code
>
> check http://code.google.com/p/pharo/issues/detail?id=2939
>
> 2010/10/6 Guillermo Polito <[hidden email]>
> http://code.google.com/p/pharo/issues/detail?id=3069
>
> if you type:
>
> [] -> []]
>
> () -> ())
>
> {} -> {}}
>
>
>
> Bye!
>
> _______________________________________________
> 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
>
>
> _______________________________________________
> 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: bad bracket autocompletion in Pharo Core 1.2

Mariano Martinez Peck
In reply to this post by Guillermo Polito
Guille, if I remember correctly (not sure), these new classes like TextEditor and Smalltalk editor came from Cuis. Juan (Cuis author) i think he is in the mailing list but not read it so frequently. So, for this issues maybe you can cc'ed him.

Cheers

Mariano

2010/10/9 Guillermo Polito <[hidden email]>
Here is the piece of code that's behaving weird

TextEditor>>dispatchOn:

...
...
char := aKeyboardEvent keyCharacter.
     openers := '([{'. 
    closers := ')]}'.
       ( closers includes: char) ifTrue: [ self blinkPrevParen: char ].
       result := self normalCharacter: aKeyboardEvent.
       (self class autoEnclose and: [ openers includes: char ])  not ifTrue: [ ^ result  ].
    suffix := closers at: (openers indexOf: char).
    paragraph text append: suffix asString.
      self moveCursor: [ : position | position  ] forward: true specialBlock: [ : pos | "no special behavior" ] event: aKeyboardEvent .
    self userHasEdited.

-------------------------------------

So, if I evaluate "TextEditor autoEnclose: false", it is stops behaving like that :)

What should be the desired behavior?  Having it configurable as it is today but fix the strange bracket adding? remove this behavior?
I can't find now how ParagraphEditor did this.

Guille


On Wed, Oct 6, 2010 at 10:34 PM, Guillermo Polito <[hidden email]> wrote:
Yes, the issue can be reduced to:

open parenthesis (or brackets), then something else (anywhere in the editor).

2010/10/6 Mariano Martinez Peck <[hidden email]>

I detected a similar problem:

once you type an opening parenthesis, and then something else, it adds a new one at the END of the code

check http://code.google.com/p/pharo/issues/detail?id=2939

2010/10/6 Guillermo Polito <[hidden email]>
http://code.google.com/p/pharo/issues/detail?id=3069

if you type:

[] -> []]

() -> ())

{} -> {}}


Bye!

_______________________________________________
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



_______________________________________________
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: bad bracket autocompletion in Pharo Core 1.2

Juan Vuletich-4
Hi Folks,

Cuis doesn't include #autoEnclose, so I don't know how it should behave.

Cheers,
Juan Vuletich

Mariano Martinez Peck wrote:

> Guille, if I remember correctly (not sure), these new classes like
> TextEditor and Smalltalk editor came from Cuis. Juan (Cuis author) i
> think he is in the mailing list but not read it so frequently. So, for
> this issues maybe you can cc'ed him.
>
> Cheers
>
> Mariano
>
> 2010/10/9 Guillermo Polito <[hidden email]
> <mailto:[hidden email]>>
>
>     Here is the piece of code that's behaving weird
>
>     TextEditor>>dispatchOn:
>
>     ...
>     ...
>     char := aKeyboardEvent keyCharacter.
>          openers := '([{'.
>         closers := ')]}'.
>            ( closers includes: char) ifTrue: [ self blinkPrevParen:
>     char ].
>            result := self normalCharacter: aKeyboardEvent.
>            (self class autoEnclose and: [ openers includes: char ])
>     not ifTrue: [ ^ result  ].
>         suffix := closers at: (openers indexOf: char).
>         paragraph text append: suffix asString.
>           self moveCursor: [ : position | position  ] forward: true
>     specialBlock: [ : pos | "no special behavior" ] event:
>     aKeyboardEvent .
>         self userHasEdited.
>
>     -------------------------------------
>
>     So, if I evaluate "TextEditor autoEnclose: false", it is stops
>     behaving like that :)
>
>     What should be the desired behavior?  Having it configurable as it
>     is today but fix the strange bracket adding? remove this behavior?
>     I can't find now how ParagraphEditor did this.
>
>     Guille
>
>
>     On Wed, Oct 6, 2010 at 10:34 PM, Guillermo Polito
>     <[hidden email] <mailto:[hidden email]>> wrote:
>
>         Yes, the issue can be reduced to:
>
>         open parenthesis (or brackets), then something else (anywhere
>         in the editor).
>
>         2010/10/6 Mariano Martinez Peck <[hidden email]
>         <mailto:[hidden email]>>
>
>             I detected a similar problem:
>
>             once you type an opening parenthesis, and then something
>             else, it adds a new one at the END of the code
>
>             check http://code.google.com/p/pharo/issues/detail?id=2939
>
>             2010/10/6 Guillermo Polito <[hidden email]
>             <mailto:[hidden email]>>
>
>                 http://code.google.com/p/pharo/issues/detail?id=3069
>
>                 if you type:
>
>                 [] -> []]
>
>                 () -> ())
>
>                 {} -> {}}
>                          
>
>
>
>                 Bye!
>
>                 _______________________________________________
>                 Pharo-project mailing list
>                 [hidden email]
>                 <mailto:[hidden email]>
>                 http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
>
>             _______________________________________________
>             Pharo-project mailing list
>             [hidden email]
>             <mailto:[hidden email]>
>             http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
>
>
>     _______________________________________________
>     Pharo-project mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 9.0.862 / Virus Database: 271.1.1/3184 - Release Date: 10/08/10 03:34:00
>
>  


_______________________________________________
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: bad bracket autocompletion in Pharo Core 1.2

Fernando olivero-2
Hi , it was a enhancement i did starting from a Chris Muller enhancement for Squeak.

ISSUE 2653.
<a href="http://code.google.com/p/pharo/issues/detail?id=2653&amp;can=1&amp;q=auto&amp;colspec=ID Type Status Summary Milestone Difficulty">http://code.google.com/p/pharo/issues/detail?id=2653&can=1&q=auto&colspec=ID%20Type%20Status%20Summary%20Milestone%20Difficulty

I did a test, maybe a good start would be to see if its failing now.

Fernando

On Oct 9, 2010, at 2:18 PM, Juan Vuletich wrote:

Hi Folks,

Cuis doesn't include #autoEnclose, so I don't know how it should behave.

Cheers,
Juan Vuletich

Mariano Martinez Peck wrote:
Guille, if I remember correctly (not sure), these new classes like
TextEditor and Smalltalk editor came from Cuis. Juan (Cuis author) i
think he is in the mailing list but not read it so frequently. So, for
this issues maybe you can cc'ed him.

Cheers

Mariano

2010/10/9 Guillermo Polito <[hidden email]
<[hidden email]>>

   Here is the piece of code that's behaving weird

   TextEditor>>dispatchOn:

   ...
   ...
   char := aKeyboardEvent keyCharacter.
        openers := '([{'.
       closers := ')]}'.
          ( closers includes: char) ifTrue: [ self blinkPrevParen:
   char ].
          result := self normalCharacter: aKeyboardEvent.
          (self class autoEnclose and: [ openers includes: char ])
   not ifTrue: [ ^ result  ].
       suffix := closers at: (openers indexOf: char).
       paragraph text append: suffix asString.
         self moveCursor: [ : position | position  ] forward: true
   specialBlock: [ : pos | "no special behavior" ] event:
   aKeyboardEvent .
       self userHasEdited.

   -------------------------------------

   So, if I evaluate "TextEditor autoEnclose: false", it is stops
   behaving like that :)

   What should be the desired behavior?  Having it configurable as it
   is today but fix the strange bracket adding? remove this behavior?
   I can't find now how ParagraphEditor did this.

   Guille


   On Wed, Oct 6, 2010 at 10:34 PM, Guillermo Polito
   <[hidden email] <[hidden email]>> wrote:

       Yes, the issue can be reduced to:

       open parenthesis (or brackets), then something else (anywhere
       in the editor).

       2010/10/6 Mariano Martinez Peck <[hidden email]
       <[hidden email]>>

           I detected a similar problem:

           once you type an opening parenthesis, and then something
           else, it adds a new one at the END of the code

           check http://code.google.com/p/pharo/issues/detail?id=2939

           2010/10/6 Guillermo Polito <[hidden email]
           <[hidden email]>>

               http://code.google.com/p/pharo/issues/detail?id=3069

               if you type:

               [] -> []]

               () -> ())

               {} -> {}}




               Bye!

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



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




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


------------------------------------------------------------------------


No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.862 / Virus Database: 271.1.1/3184 - Release Date: 10/08/10 03:34:00




_______________________________________________
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: bad bracket autocompletion in Pharo Core 1.2

Stéphane Ducasse
In reply to this post by Juan Vuletich-4
thanks!


On Oct 11, 2010, at 9:37 AM, Fernando olivero wrote:

> Hi , it was a enhancement i did starting from a Chris Muller enhancement for Squeak.
>
> ISSUE 2653.
> http://code.google.com/p/pharo/issues/detail?id=2653&can=1&q=auto&colspec=ID%20Type%20Status%20Summary%20Milestone%20Difficulty
>
> I did a test, maybe a good start would be to see if its failing now.
>
> Fernando
>
> On Oct 9, 2010, at 2:18 PM, Juan Vuletich wrote:
>
>> Hi Folks,
>>
>> Cuis doesn't include #autoEnclose, so I don't know how it should behave.
>>
>> Cheers,
>> Juan Vuletich
>>
>> Mariano Martinez Peck wrote:
>>> Guille, if I remember correctly (not sure), these new classes like
>>> TextEditor and Smalltalk editor came from Cuis. Juan (Cuis author) i
>>> think he is in the mailing list but not read it so frequently. So, for
>>> this issues maybe you can cc'ed him.
>>>
>>> Cheers
>>>
>>> Mariano
>>>
>>> 2010/10/9 Guillermo Polito <[hidden email]
>>> <mailto:[hidden email]>>
>>>
>>>    Here is the piece of code that's behaving weird
>>>
>>>    TextEditor>>dispatchOn:
>>>
>>>    ...
>>>    ...
>>>    char := aKeyboardEvent keyCharacter.
>>>         openers := '([{'.
>>>        closers := ')]}'.
>>>           ( closers includes: char) ifTrue: [ self blinkPrevParen:
>>>    char ].
>>>           result := self normalCharacter: aKeyboardEvent.
>>>           (self class autoEnclose and: [ openers includes: char ])
>>>    not ifTrue: [ ^ result  ].
>>>        suffix := closers at: (openers indexOf: char).
>>>        paragraph text append: suffix asString.
>>>          self moveCursor: [ : position | position  ] forward: true
>>>    specialBlock: [ : pos | "no special behavior" ] event:
>>>    aKeyboardEvent .
>>>        self userHasEdited.
>>>
>>>    -------------------------------------
>>>
>>>    So, if I evaluate "TextEditor autoEnclose: false", it is stops
>>>    behaving like that :)
>>>
>>>    What should be the desired behavior?  Having it configurable as it
>>>    is today but fix the strange bracket adding? remove this behavior?
>>>    I can't find now how ParagraphEditor did this.
>>>
>>>    Guille
>>>
>>>
>>>    On Wed, Oct 6, 2010 at 10:34 PM, Guillermo Polito
>>>    <[hidden email] <mailto:[hidden email]>> wrote:
>>>
>>>        Yes, the issue can be reduced to:
>>>
>>>        open parenthesis (or brackets), then something else (anywhere
>>>        in the editor).
>>>
>>>        2010/10/6 Mariano Martinez Peck <[hidden email]
>>>        <mailto:[hidden email]>>
>>>
>>>            I detected a similar problem:
>>>
>>>            once you type an opening parenthesis, and then something
>>>            else, it adds a new one at the END of the code
>>>
>>>            check http://code.google.com/p/pharo/issues/detail?id=2939
>>>
>>>            2010/10/6 Guillermo Polito <[hidden email]
>>>            <mailto:[hidden email]>>
>>>
>>>                http://code.google.com/p/pharo/issues/detail?id=3069
>>>
>>>                if you type:
>>>
>>>                [] -> []]
>>>
>>>                () -> ())
>>>
>>>                {} -> {}}
>>>
>>>
>>>
>>>
>>>                Bye!
>>>
>>>                _______________________________________________
>>>                Pharo-project mailing list
>>>                [hidden email]
>>>                <mailto:[hidden email]>
>>>                http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>>
>>>
>>>            _______________________________________________
>>>            Pharo-project mailing list
>>>            [hidden email]
>>>            <mailto:[hidden email]>
>>>            http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>>
>>>
>>>
>>>    _______________________________________________
>>>    Pharo-project mailing list
>>>    [hidden email]
>>>    <mailto:[hidden email]>
>>>    http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>>
>>> No virus found in this incoming message.
>>> Checked by AVG - www.avg.com
>>> Version: 9.0.862 / Virus Database: 271.1.1/3184 - Release Date: 10/08/10 03:34:00
>>>
>>>
>>
>>
>> _______________________________________________
>> 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


_______________________________________________
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: bad bracket autocompletion in Pharo Core 1.2

Pavel Krivanek-3
Can we add a setting for it? (issue
http://code.google.com/p/pharo/issues/detail?id=3113)

Cheers,
-- Pavel

On Tue, Oct 12, 2010 at 8:58 AM, Stéphane Ducasse
<[hidden email]> wrote:

> thanks!
>
>
> On Oct 11, 2010, at 9:37 AM, Fernando olivero wrote:
>
>> Hi , it was a enhancement i did starting from a Chris Muller enhancement for Squeak.
>>
>> ISSUE 2653.
>> http://code.google.com/p/pharo/issues/detail?id=2653&can=1&q=auto&colspec=ID%20Type%20Status%20Summary%20Milestone%20Difficulty
>>
>> I did a test, maybe a good start would be to see if its failing now.
>>
>> Fernando
>>
>> On Oct 9, 2010, at 2:18 PM, Juan Vuletich wrote:
>>
>>> Hi Folks,
>>>
>>> Cuis doesn't include #autoEnclose, so I don't know how it should behave.
>>>
>>> Cheers,
>>> Juan Vuletich
>>>
>>> Mariano Martinez Peck wrote:
>>>> Guille, if I remember correctly (not sure), these new classes like
>>>> TextEditor and Smalltalk editor came from Cuis. Juan (Cuis author) i
>>>> think he is in the mailing list but not read it so frequently. So, for
>>>> this issues maybe you can cc'ed him.
>>>>
>>>> Cheers
>>>>
>>>> Mariano
>>>>
>>>> 2010/10/9 Guillermo Polito <[hidden email]
>>>> <mailto:[hidden email]>>
>>>>
>>>>    Here is the piece of code that's behaving weird
>>>>
>>>>    TextEditor>>dispatchOn:
>>>>
>>>>    ...
>>>>    ...
>>>>    char := aKeyboardEvent keyCharacter.
>>>>         openers := '([{'.
>>>>        closers := ')]}'.
>>>>           ( closers includes: char) ifTrue: [ self blinkPrevParen:
>>>>    char ].
>>>>           result := self normalCharacter: aKeyboardEvent.
>>>>           (self class autoEnclose and: [ openers includes: char ])
>>>>    not ifTrue: [ ^ result  ].
>>>>        suffix := closers at: (openers indexOf: char).
>>>>        paragraph text append: suffix asString.
>>>>          self moveCursor: [ : position | position  ] forward: true
>>>>    specialBlock: [ : pos | "no special behavior" ] event:
>>>>    aKeyboardEvent .
>>>>        self userHasEdited.
>>>>
>>>>    -------------------------------------
>>>>
>>>>    So, if I evaluate "TextEditor autoEnclose: false", it is stops
>>>>    behaving like that :)
>>>>
>>>>    What should be the desired behavior?  Having it configurable as it
>>>>    is today but fix the strange bracket adding? remove this behavior?
>>>>    I can't find now how ParagraphEditor did this.
>>>>
>>>>    Guille
>>>>
>>>>
>>>>    On Wed, Oct 6, 2010 at 10:34 PM, Guillermo Polito
>>>>    <[hidden email] <mailto:[hidden email]>> wrote:
>>>>
>>>>        Yes, the issue can be reduced to:
>>>>
>>>>        open parenthesis (or brackets), then something else (anywhere
>>>>        in the editor).
>>>>
>>>>        2010/10/6 Mariano Martinez Peck <[hidden email]
>>>>        <mailto:[hidden email]>>
>>>>
>>>>            I detected a similar problem:
>>>>
>>>>            once you type an opening parenthesis, and then something
>>>>            else, it adds a new one at the END of the code
>>>>
>>>>            check http://code.google.com/p/pharo/issues/detail?id=2939
>>>>
>>>>            2010/10/6 Guillermo Polito <[hidden email]
>>>>            <mailto:[hidden email]>>
>>>>
>>>>                http://code.google.com/p/pharo/issues/detail?id=3069
>>>>
>>>>                if you type:
>>>>
>>>>                [] -> []]
>>>>
>>>>                () -> ())
>>>>
>>>>                {} -> {}}
>>>>
>>>>
>>>>
>>>>
>>>>                Bye!
>>>>
>>>>                _______________________________________________
>>>>                Pharo-project mailing list
>>>>                [hidden email]
>>>>                <mailto:[hidden email]>
>>>>                http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>
>>>>
>>>>
>>>>            _______________________________________________
>>>>            Pharo-project mailing list
>>>>            [hidden email]
>>>>            <mailto:[hidden email]>
>>>>            http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>
>>>>
>>>>
>>>>
>>>>    _______________________________________________
>>>>    Pharo-project mailing list
>>>>    [hidden email]
>>>>    <mailto:[hidden email]>
>>>>    http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>>
>>>> No virus found in this incoming message.
>>>> Checked by AVG - www.avg.com
>>>> Version: 9.0.862 / Virus Database: 271.1.1/3184 - Release Date: 10/08/10 03:34:00
>>>>
>>>>
>>>
>>>
>>> _______________________________________________
>>> 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
>
>
> _______________________________________________
> 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: bad bracket autocompletion in Pharo Core 1.2

Stéphane Ducasse
In reply to this post by Stéphane Ducasse
hi guys

If you refer and change closed bug entry we will not see them.
Since we look for fixed items.
So please open new issues.

Stef


On Oct 16, 2010, at 10:27 PM, Pavel Krivanek wrote:

> Can we add a setting for it? (issue
> http://code.google.com/p/pharo/issues/detail?id=3113)
>
> Cheers,
> -- Pavel
>
> On Tue, Oct 12, 2010 at 8:58 AM, Stéphane Ducasse
> <[hidden email]> wrote:
>> thanks!
>>
>>
>> On Oct 11, 2010, at 9:37 AM, Fernando olivero wrote:
>>
>>> Hi , it was a enhancement i did starting from a Chris Muller enhancement for Squeak.
>>>
>>> ISSUE 2653.
>>> http://code.google.com/p/pharo/issues/detail?id=2653&can=1&q=auto&colspec=ID%20Type%20Status%20Summary%20Milestone%20Difficulty
>>>
>>> I did a test, maybe a good start would be to see if its failing now.
>>>
>>> Fernando
>>>
>>> On Oct 9, 2010, at 2:18 PM, Juan Vuletich wrote:
>>>
>>>> Hi Folks,
>>>>
>>>> Cuis doesn't include #autoEnclose, so I don't know how it should behave.
>>>>
>>>> Cheers,
>>>> Juan Vuletich
>>>>
>>>> Mariano Martinez Peck wrote:
>>>>> Guille, if I remember correctly (not sure), these new classes like
>>>>> TextEditor and Smalltalk editor came from Cuis. Juan (Cuis author) i
>>>>> think he is in the mailing list but not read it so frequently. So, for
>>>>> this issues maybe you can cc'ed him.
>>>>>
>>>>> Cheers
>>>>>
>>>>> Mariano
>>>>>
>>>>> 2010/10/9 Guillermo Polito <[hidden email]
>>>>> <mailto:[hidden email]>>
>>>>>
>>>>>    Here is the piece of code that's behaving weird
>>>>>
>>>>>    TextEditor>>dispatchOn:
>>>>>
>>>>>    ...
>>>>>    ...
>>>>>    char := aKeyboardEvent keyCharacter.
>>>>>         openers := '([{'.
>>>>>        closers := ')]}'.
>>>>>           ( closers includes: char) ifTrue: [ self blinkPrevParen:
>>>>>    char ].
>>>>>           result := self normalCharacter: aKeyboardEvent.
>>>>>           (self class autoEnclose and: [ openers includes: char ])
>>>>>    not ifTrue: [ ^ result  ].
>>>>>        suffix := closers at: (openers indexOf: char).
>>>>>        paragraph text append: suffix asString.
>>>>>          self moveCursor: [ : position | position  ] forward: true
>>>>>    specialBlock: [ : pos | "no special behavior" ] event:
>>>>>    aKeyboardEvent .
>>>>>        self userHasEdited.
>>>>>
>>>>>    -------------------------------------
>>>>>
>>>>>    So, if I evaluate "TextEditor autoEnclose: false", it is stops
>>>>>    behaving like that :)
>>>>>
>>>>>    What should be the desired behavior?  Having it configurable as it
>>>>>    is today but fix the strange bracket adding? remove this behavior?
>>>>>    I can't find now how ParagraphEditor did this.
>>>>>
>>>>>    Guille
>>>>>
>>>>>
>>>>>    On Wed, Oct 6, 2010 at 10:34 PM, Guillermo Polito
>>>>>    <[hidden email] <mailto:[hidden email]>> wrote:
>>>>>
>>>>>        Yes, the issue can be reduced to:
>>>>>
>>>>>        open parenthesis (or brackets), then something else (anywhere
>>>>>        in the editor).
>>>>>
>>>>>        2010/10/6 Mariano Martinez Peck <[hidden email]
>>>>>        <mailto:[hidden email]>>
>>>>>
>>>>>            I detected a similar problem:
>>>>>
>>>>>            once you type an opening parenthesis, and then something
>>>>>            else, it adds a new one at the END of the code
>>>>>
>>>>>            check http://code.google.com/p/pharo/issues/detail?id=2939
>>>>>
>>>>>            2010/10/6 Guillermo Polito <[hidden email]
>>>>>            <mailto:[hidden email]>>
>>>>>
>>>>>                http://code.google.com/p/pharo/issues/detail?id=3069
>>>>>
>>>>>                if you type:
>>>>>
>>>>>                [] -> []]
>>>>>
>>>>>                () -> ())
>>>>>
>>>>>                {} -> {}}
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>                Bye!
>>>>>
>>>>>                _______________________________________________
>>>>>                Pharo-project mailing list
>>>>>                [hidden email]
>>>>>                <mailto:[hidden email]>
>>>>>                http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>
>>>>>
>>>>>
>>>>>            _______________________________________________
>>>>>            Pharo-project mailing list
>>>>>            [hidden email]
>>>>>            <mailto:[hidden email]>
>>>>>            http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>    _______________________________________________
>>>>>    Pharo-project mailing list
>>>>>    [hidden email]
>>>>>    <mailto:[hidden email]>
>>>>>    http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------
>>>>>
>>>>>
>>>>> No virus found in this incoming message.
>>>>> Checked by AVG - www.avg.com
>>>>> Version: 9.0.862 / Virus Database: 271.1.1/3184 - Release Date: 10/08/10 03:34:00
>>>>>
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> 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
>>
>>
>> _______________________________________________
>> 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


_______________________________________________
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: bad bracket autocompletion in Pharo Core 1.2

Stéphane Ducasse
In reply to this post by Stéphane Ducasse
I have a question:
        does shout support closing parenthesis behavior?
       

Stef

On Oct 16, 2010, at 10:27 PM, Pavel Krivanek wrote:

> Can we add a setting for it? (issue
> http://code.google.com/p/pharo/issues/detail?id=3113)
>
> Cheers,
> -- Pavel
>
> On Tue, Oct 12, 2010 at 8:58 AM, Stéphane Ducasse
> <[hidden email]> wrote:
>> thanks!
>>
>>
>> On Oct 11, 2010, at 9:37 AM, Fernando olivero wrote:
>>
>>> Hi , it was a enhancement i did starting from a Chris Muller enhancement for Squeak.
>>>
>>> ISSUE 2653.
>>> http://code.google.com/p/pharo/issues/detail?id=2653&can=1&q=auto&colspec=ID%20Type%20Status%20Summary%20Milestone%20Difficulty
>>>
>>> I did a test, maybe a good start would be to see if its failing now.
>>>
>>> Fernando
>>>
>>> On Oct 9, 2010, at 2:18 PM, Juan Vuletich wrote:
>>>
>>>> Hi Folks,
>>>>
>>>> Cuis doesn't include #autoEnclose, so I don't know how it should behave.
>>>>
>>>> Cheers,
>>>> Juan Vuletich
>>>>
>>>> Mariano Martinez Peck wrote:
>>>>> Guille, if I remember correctly (not sure), these new classes like
>>>>> TextEditor and Smalltalk editor came from Cuis. Juan (Cuis author) i
>>>>> think he is in the mailing list but not read it so frequently. So, for
>>>>> this issues maybe you can cc'ed him.
>>>>>
>>>>> Cheers
>>>>>
>>>>> Mariano
>>>>>
>>>>> 2010/10/9 Guillermo Polito <[hidden email]
>>>>> <mailto:[hidden email]>>
>>>>>
>>>>>    Here is the piece of code that's behaving weird
>>>>>
>>>>>    TextEditor>>dispatchOn:
>>>>>
>>>>>    ...
>>>>>    ...
>>>>>    char := aKeyboardEvent keyCharacter.
>>>>>         openers := '([{'.
>>>>>        closers := ')]}'.
>>>>>           ( closers includes: char) ifTrue: [ self blinkPrevParen:
>>>>>    char ].
>>>>>           result := self normalCharacter: aKeyboardEvent.
>>>>>           (self class autoEnclose and: [ openers includes: char ])
>>>>>    not ifTrue: [ ^ result  ].
>>>>>        suffix := closers at: (openers indexOf: char).
>>>>>        paragraph text append: suffix asString.
>>>>>          self moveCursor: [ : position | position  ] forward: true
>>>>>    specialBlock: [ : pos | "no special behavior" ] event:
>>>>>    aKeyboardEvent .
>>>>>        self userHasEdited.
>>>>>
>>>>>    -------------------------------------
>>>>>
>>>>>    So, if I evaluate "TextEditor autoEnclose: false", it is stops
>>>>>    behaving like that :)
>>>>>
>>>>>    What should be the desired behavior?  Having it configurable as it
>>>>>    is today but fix the strange bracket adding? remove this behavior?
>>>>>    I can't find now how ParagraphEditor did this.
>>>>>
>>>>>    Guille
>>>>>
>>>>>
>>>>>    On Wed, Oct 6, 2010 at 10:34 PM, Guillermo Polito
>>>>>    <[hidden email] <mailto:[hidden email]>> wrote:
>>>>>
>>>>>        Yes, the issue can be reduced to:
>>>>>
>>>>>        open parenthesis (or brackets), then something else (anywhere
>>>>>        in the editor).
>>>>>
>>>>>        2010/10/6 Mariano Martinez Peck <[hidden email]
>>>>>        <mailto:[hidden email]>>
>>>>>
>>>>>            I detected a similar problem:
>>>>>
>>>>>            once you type an opening parenthesis, and then something
>>>>>            else, it adds a new one at the END of the code
>>>>>
>>>>>            check http://code.google.com/p/pharo/issues/detail?id=2939
>>>>>
>>>>>            2010/10/6 Guillermo Polito <[hidden email]
>>>>>            <mailto:[hidden email]>>
>>>>>
>>>>>                http://code.google.com/p/pharo/issues/detail?id=3069
>>>>>
>>>>>                if you type:
>>>>>
>>>>>                [] -> []]
>>>>>
>>>>>                () -> ())
>>>>>
>>>>>                {} -> {}}
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>                Bye!
>>>>>
>>>>>                _______________________________________________
>>>>>                Pharo-project mailing list
>>>>>                [hidden email]
>>>>>                <mailto:[hidden email]>
>>>>>                http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>
>>>>>
>>>>>
>>>>>            _______________________________________________
>>>>>            Pharo-project mailing list
>>>>>            [hidden email]
>>>>>            <mailto:[hidden email]>
>>>>>            http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>    _______________________________________________
>>>>>    Pharo-project mailing list
>>>>>    [hidden email]
>>>>>    <mailto:[hidden email]>
>>>>>    http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------
>>>>>
>>>>>
>>>>> No virus found in this incoming message.
>>>>> Checked by AVG - www.avg.com
>>>>> Version: 9.0.862 / Virus Database: 271.1.1/3184 - Release Date: 10/08/10 03:34:00
>>>>>
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> 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
>>
>>
>> _______________________________________________
>> 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


_______________________________________________
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: bad bracket autocompletion in Pharo Core 1.2

Mariano Martinez Peck


On Sun, Oct 17, 2010 at 10:51 AM, Stéphane Ducasse <[hidden email]> wrote:
I have a question:
       does shout support closing parenthesis behavior?



I wonder the same. I don't see the difference between this and shout smart characters.

 
Stef

On Oct 16, 2010, at 10:27 PM, Pavel Krivanek wrote:

> Can we add a setting for it? (issue
> http://code.google.com/p/pharo/issues/detail?id=3113)
>
> Cheers,
> -- Pavel
>
> On Tue, Oct 12, 2010 at 8:58 AM, Stéphane Ducasse
> <[hidden email]> wrote:
>> thanks!
>>
>>
>> On Oct 11, 2010, at 9:37 AM, Fernando olivero wrote:
>>
>>> Hi , it was a enhancement i did starting from a Chris Muller enhancement for Squeak.
>>>
>>> ISSUE 2653.
>>> http://code.google.com/p/pharo/issues/detail?id=2653&can=1&q=auto&colspec=ID%20Type%20Status%20Summary%20Milestone%20Difficulty
>>>
>>> I did a test, maybe a good start would be to see if its failing now.
>>>
>>> Fernando
>>>
>>> On Oct 9, 2010, at 2:18 PM, Juan Vuletich wrote:
>>>
>>>> Hi Folks,
>>>>
>>>> Cuis doesn't include #autoEnclose, so I don't know how it should behave.
>>>>
>>>> Cheers,
>>>> Juan Vuletich
>>>>
>>>> Mariano Martinez Peck wrote:
>>>>> Guille, if I remember correctly (not sure), these new classes like
>>>>> TextEditor and Smalltalk editor came from Cuis. Juan (Cuis author) i
>>>>> think he is in the mailing list but not read it so frequently. So, for
>>>>> this issues maybe you can cc'ed him.
>>>>>
>>>>> Cheers
>>>>>
>>>>> Mariano
>>>>>
>>>>> 2010/10/9 Guillermo Polito <[hidden email]
>>>>> <mailto:[hidden email]>>
>>>>>
>>>>>    Here is the piece of code that's behaving weird
>>>>>
>>>>>    TextEditor>>dispatchOn:
>>>>>
>>>>>    ...
>>>>>    ...
>>>>>    char := aKeyboardEvent keyCharacter.
>>>>>         openers := '([{'.
>>>>>        closers := ')]}'.
>>>>>           ( closers includes: char) ifTrue: [ self blinkPrevParen:
>>>>>    char ].
>>>>>           result := self normalCharacter: aKeyboardEvent.
>>>>>           (self class autoEnclose and: [ openers includes: char ])
>>>>>    not ifTrue: [ ^ result  ].
>>>>>        suffix := closers at: (openers indexOf: char).
>>>>>        paragraph text append: suffix asString.
>>>>>          self moveCursor: [ : position | position  ] forward: true
>>>>>    specialBlock: [ : pos | "no special behavior" ] event:
>>>>>    aKeyboardEvent .
>>>>>        self userHasEdited.
>>>>>
>>>>>    -------------------------------------
>>>>>
>>>>>    So, if I evaluate "TextEditor autoEnclose: false", it is stops
>>>>>    behaving like that :)
>>>>>
>>>>>    What should be the desired behavior?  Having it configurable as it
>>>>>    is today but fix the strange bracket adding? remove this behavior?
>>>>>    I can't find now how ParagraphEditor did this.
>>>>>
>>>>>    Guille
>>>>>
>>>>>
>>>>>    On Wed, Oct 6, 2010 at 10:34 PM, Guillermo Polito
>>>>>    <[hidden email] <mailto:[hidden email]>> wrote:
>>>>>
>>>>>        Yes, the issue can be reduced to:
>>>>>
>>>>>        open parenthesis (or brackets), then something else (anywhere
>>>>>        in the editor).
>>>>>
>>>>>        2010/10/6 Mariano Martinez Peck <[hidden email]
>>>>>        <mailto:[hidden email]>>
>>>>>
>>>>>            I detected a similar problem:
>>>>>
>>>>>            once you type an opening parenthesis, and then something
>>>>>            else, it adds a new one at the END of the code
>>>>>
>>>>>            check http://code.google.com/p/pharo/issues/detail?id=2939
>>>>>
>>>>>            2010/10/6 Guillermo Polito <[hidden email]
>>>>>            <mailto:[hidden email]>>
>>>>>
>>>>>                http://code.google.com/p/pharo/issues/detail?id=3069
>>>>>
>>>>>                if you type:
>>>>>
>>>>>                [] -> []]
>>>>>
>>>>>                () -> ())
>>>>>
>>>>>                {} -> {}}
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>                Bye!
>>>>>
>>>>>                _______________________________________________
>>>>>                Pharo-project mailing list
>>>>>                [hidden email]
>>>>>                <mailto:[hidden email]>
>>>>>                http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>
>>>>>
>>>>>
>>>>>            _______________________________________________
>>>>>            Pharo-project mailing list
>>>>>            [hidden email]
>>>>>            <mailto:[hidden email]>
>>>>>            http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>    _______________________________________________
>>>>>    Pharo-project mailing list
>>>>>    [hidden email]
>>>>>    <mailto:[hidden email]>
>>>>>    http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------
>>>>>
>>>>>
>>>>> No virus found in this incoming message.
>>>>> Checked by AVG - www.avg.com
>>>>> Version: 9.0.862 / Virus Database: 271.1.1/3184 - Release Date: 10/08/10 03:34:00
>>>>>
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> 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
>>
>>
>> _______________________________________________
>> 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


_______________________________________________
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: bad bracket autocompletion in Pharo Core 1.2

Stéphane Ducasse
In reply to this post by Stéphane Ducasse

On Oct 17, 2010, at 1:00 PM, Mariano Martinez Peck wrote:

>
>
> On Sun, Oct 17, 2010 at 10:51 AM, Stéphane Ducasse <[hidden email]> wrote:
> I have a question:
>        does shout support closing parenthesis behavior?
>
>
>
> I wonder the same. I don't see the difference between this and shout smart characters.

so may be we could remove this and keep smart characters.
Now that there is a setting we could try and see.



>
>  
> Stef
>
> On Oct 16, 2010, at 10:27 PM, Pavel Krivanek wrote:
>
> > Can we add a setting for it? (issue
> > http://code.google.com/p/pharo/issues/detail?id=3113)
> >
> > Cheers,
> > -- Pavel
> >
> > On Tue, Oct 12, 2010 at 8:58 AM, Stéphane Ducasse
> > <[hidden email]> wrote:
> >> thanks!
> >>
> >>
> >> On Oct 11, 2010, at 9:37 AM, Fernando olivero wrote:
> >>
> >>> Hi , it was a enhancement i did starting from a Chris Muller enhancement for Squeak.
> >>>
> >>> ISSUE 2653.
> >>> http://code.google.com/p/pharo/issues/detail?id=2653&can=1&q=auto&colspec=ID%20Type%20Status%20Summary%20Milestone%20Difficulty
> >>>
> >>> I did a test, maybe a good start would be to see if its failing now.
> >>>
> >>> Fernando
> >>>
> >>> On Oct 9, 2010, at 2:18 PM, Juan Vuletich wrote:
> >>>
> >>>> Hi Folks,
> >>>>
> >>>> Cuis doesn't include #autoEnclose, so I don't know how it should behave.
> >>>>
> >>>> Cheers,
> >>>> Juan Vuletich
> >>>>
> >>>> Mariano Martinez Peck wrote:
> >>>>> Guille, if I remember correctly (not sure), these new classes like
> >>>>> TextEditor and Smalltalk editor came from Cuis. Juan (Cuis author) i
> >>>>> think he is in the mailing list but not read it so frequently. So, for
> >>>>> this issues maybe you can cc'ed him.
> >>>>>
> >>>>> Cheers
> >>>>>
> >>>>> Mariano
> >>>>>
> >>>>> 2010/10/9 Guillermo Polito <[hidden email]
> >>>>> <mailto:[hidden email]>>
> >>>>>
> >>>>>    Here is the piece of code that's behaving weird
> >>>>>
> >>>>>    TextEditor>>dispatchOn:
> >>>>>
> >>>>>    ...
> >>>>>    ...
> >>>>>    char := aKeyboardEvent keyCharacter.
> >>>>>         openers := '([{'.
> >>>>>        closers := ')]}'.
> >>>>>           ( closers includes: char) ifTrue: [ self blinkPrevParen:
> >>>>>    char ].
> >>>>>           result := self normalCharacter: aKeyboardEvent.
> >>>>>           (self class autoEnclose and: [ openers includes: char ])
> >>>>>    not ifTrue: [ ^ result  ].
> >>>>>        suffix := closers at: (openers indexOf: char).
> >>>>>        paragraph text append: suffix asString.
> >>>>>          self moveCursor: [ : position | position  ] forward: true
> >>>>>    specialBlock: [ : pos | "no special behavior" ] event:
> >>>>>    aKeyboardEvent .
> >>>>>        self userHasEdited.
> >>>>>
> >>>>>    -------------------------------------
> >>>>>
> >>>>>    So, if I evaluate "TextEditor autoEnclose: false", it is stops
> >>>>>    behaving like that :)
> >>>>>
> >>>>>    What should be the desired behavior?  Having it configurable as it
> >>>>>    is today but fix the strange bracket adding? remove this behavior?
> >>>>>    I can't find now how ParagraphEditor did this.
> >>>>>
> >>>>>    Guille
> >>>>>
> >>>>>
> >>>>>    On Wed, Oct 6, 2010 at 10:34 PM, Guillermo Polito
> >>>>>    <[hidden email] <mailto:[hidden email]>> wrote:
> >>>>>
> >>>>>        Yes, the issue can be reduced to:
> >>>>>
> >>>>>        open parenthesis (or brackets), then something else (anywhere
> >>>>>        in the editor).
> >>>>>
> >>>>>        2010/10/6 Mariano Martinez Peck <[hidden email]
> >>>>>        <mailto:[hidden email]>>
> >>>>>
> >>>>>            I detected a similar problem:
> >>>>>
> >>>>>            once you type an opening parenthesis, and then something
> >>>>>            else, it adds a new one at the END of the code
> >>>>>
> >>>>>            check http://code.google.com/p/pharo/issues/detail?id=2939
> >>>>>
> >>>>>            2010/10/6 Guillermo Polito <[hidden email]
> >>>>>            <mailto:[hidden email]>>
> >>>>>
> >>>>>                http://code.google.com/p/pharo/issues/detail?id=3069
> >>>>>
> >>>>>                if you type:
> >>>>>
> >>>>>                [] -> []]
> >>>>>
> >>>>>                () -> ())
> >>>>>
> >>>>>                {} -> {}}
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>                Bye!
> >>>>>
> >>>>>                _______________________________________________
> >>>>>                Pharo-project mailing list
> >>>>>                [hidden email]
> >>>>>                <mailto:[hidden email]>
> >>>>>                http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> >>>>>
> >>>>>
> >>>>>
> >>>>>            _______________________________________________
> >>>>>            Pharo-project mailing list
> >>>>>            [hidden email]
> >>>>>            <mailto:[hidden email]>
> >>>>>            http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>    _______________________________________________
> >>>>>    Pharo-project mailing list
> >>>>>    [hidden email]
> >>>>>    <mailto:[hidden email]>
> >>>>>    http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> >>>>>
> >>>>>
> >>>>> ------------------------------------------------------------------------
> >>>>>
> >>>>>
> >>>>> No virus found in this incoming message.
> >>>>> Checked by AVG - www.avg.com
> >>>>> Version: 9.0.862 / Virus Database: 271.1.1/3184 - Release Date: 10/08/10 03:34:00
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> 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
> >>
> >>
> >> _______________________________________________
> >> 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
>
>
> _______________________________________________
> 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


_______________________________________________
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: bad bracket autocompletion in Pharo Core 1.2

Mariano Martinez Peck


On Mon, Oct 18, 2010 at 6:41 PM, Stéphane Ducasse <[hidden email]> wrote:

On Oct 17, 2010, at 1:00 PM, Mariano Martinez Peck wrote:

>
>
> On Sun, Oct 17, 2010 at 10:51 AM, Stéphane Ducasse <[hidden email]> wrote:
> I have a question:
>        does shout support closing parenthesis behavior?
>
>
>
> I wonder the same. I don't see the difference between this and shout smart characters.

so may be we could remove this and keep smart characters.
Now that there is a setting we could try and see.

Do you know where/why/who added this?  because I guess there is a reason that we don't see.


 



>
>
> Stef
>
> On Oct 16, 2010, at 10:27 PM, Pavel Krivanek wrote:
>
> > Can we add a setting for it? (issue
> > http://code.google.com/p/pharo/issues/detail?id=3113)
> >
> > Cheers,
> > -- Pavel
> >
> > On Tue, Oct 12, 2010 at 8:58 AM, Stéphane Ducasse
> > <[hidden email]> wrote:
> >> thanks!
> >>
> >>
> >> On Oct 11, 2010, at 9:37 AM, Fernando olivero wrote:
> >>
> >>> Hi , it was a enhancement i did starting from a Chris Muller enhancement for Squeak.
> >>>
> >>> ISSUE 2653.
> >>> http://code.google.com/p/pharo/issues/detail?id=2653&can=1&q=auto&colspec=ID%20Type%20Status%20Summary%20Milestone%20Difficulty
> >>>
> >>> I did a test, maybe a good start would be to see if its failing now.
> >>>
> >>> Fernando
> >>>
> >>> On Oct 9, 2010, at 2:18 PM, Juan Vuletich wrote:
> >>>
> >>>> Hi Folks,
> >>>>
> >>>> Cuis doesn't include #autoEnclose, so I don't know how it should behave.
> >>>>
> >>>> Cheers,
> >>>> Juan Vuletich
> >>>>
> >>>> Mariano Martinez Peck wrote:
> >>>>> Guille, if I remember correctly (not sure), these new classes like
> >>>>> TextEditor and Smalltalk editor came from Cuis. Juan (Cuis author) i
> >>>>> think he is in the mailing list but not read it so frequently. So, for
> >>>>> this issues maybe you can cc'ed him.
> >>>>>
> >>>>> Cheers
> >>>>>
> >>>>> Mariano
> >>>>>
> >>>>> 2010/10/9 Guillermo Polito <[hidden email]
> >>>>> <mailto:[hidden email]>>
> >>>>>
> >>>>>    Here is the piece of code that's behaving weird
> >>>>>
> >>>>>    TextEditor>>dispatchOn:
> >>>>>
> >>>>>    ...
> >>>>>    ...
> >>>>>    char := aKeyboardEvent keyCharacter.
> >>>>>         openers := '([{'.
> >>>>>        closers := ')]}'.
> >>>>>           ( closers includes: char) ifTrue: [ self blinkPrevParen:
> >>>>>    char ].
> >>>>>           result := self normalCharacter: aKeyboardEvent.
> >>>>>           (self class autoEnclose and: [ openers includes: char ])
> >>>>>    not ifTrue: [ ^ result  ].
> >>>>>        suffix := closers at: (openers indexOf: char).
> >>>>>        paragraph text append: suffix asString.
> >>>>>          self moveCursor: [ : position | position  ] forward: true
> >>>>>    specialBlock: [ : pos | "no special behavior" ] event:
> >>>>>    aKeyboardEvent .
> >>>>>        self userHasEdited.
> >>>>>
> >>>>>    -------------------------------------
> >>>>>
> >>>>>    So, if I evaluate "TextEditor autoEnclose: false", it is stops
> >>>>>    behaving like that :)
> >>>>>
> >>>>>    What should be the desired behavior?  Having it configurable as it
> >>>>>    is today but fix the strange bracket adding? remove this behavior?
> >>>>>    I can't find now how ParagraphEditor did this.
> >>>>>
> >>>>>    Guille
> >>>>>
> >>>>>
> >>>>>    On Wed, Oct 6, 2010 at 10:34 PM, Guillermo Polito
> >>>>>    <[hidden email] <mailto:[hidden email]>> wrote:
> >>>>>
> >>>>>        Yes, the issue can be reduced to:
> >>>>>
> >>>>>        open parenthesis (or brackets), then something else (anywhere
> >>>>>        in the editor).
> >>>>>
> >>>>>        2010/10/6 Mariano Martinez Peck <[hidden email]
> >>>>>        <mailto:[hidden email]>>
> >>>>>
> >>>>>            I detected a similar problem:
> >>>>>
> >>>>>            once you type an opening parenthesis, and then something
> >>>>>            else, it adds a new one at the END of the code
> >>>>>
> >>>>>            check http://code.google.com/p/pharo/issues/detail?id=2939
> >>>>>
> >>>>>            2010/10/6 Guillermo Polito <[hidden email]
> >>>>>            <mailto:[hidden email]>>
> >>>>>
> >>>>>                http://code.google.com/p/pharo/issues/detail?id=3069
> >>>>>
> >>>>>                if you type:
> >>>>>
> >>>>>                [] -> []]
> >>>>>
> >>>>>                () -> ())
> >>>>>
> >>>>>                {} -> {}}
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>                Bye!
> >>>>>
> >>>>>                _______________________________________________
> >>>>>                Pharo-project mailing list
> >>>>>                [hidden email]
> >>>>>                <mailto:[hidden email]>
> >>>>>                http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> >>>>>
> >>>>>
> >>>>>
> >>>>>            _______________________________________________
> >>>>>            Pharo-project mailing list
> >>>>>            [hidden email]
> >>>>>            <mailto:[hidden email]>
> >>>>>            http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>    _______________________________________________
> >>>>>    Pharo-project mailing list
> >>>>>    [hidden email]
> >>>>>    <mailto:[hidden email]>
> >>>>>    http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> >>>>>
> >>>>>
> >>>>> ------------------------------------------------------------------------
> >>>>>
> >>>>>
> >>>>> No virus found in this incoming message.
> >>>>> Checked by AVG - www.avg.com
> >>>>> Version: 9.0.862 / Virus Database: 271.1.1/3184 - Release Date: 10/08/10 03:34:00
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> 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
> >>
> >>
> >> _______________________________________________
> >> 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
>
>
> _______________________________________________
> 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


_______________________________________________
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: bad bracket autocompletion in Pharo Core 1.2

Stéphane Ducasse
In reply to this post by Stéphane Ducasse
>
> > On Sun, Oct 17, 2010 at 10:51 AM, Stéphane Ducasse <[hidden email]> wrote:
> > I have a question:
> >        does shout support closing parenthesis behavior?
> >
> >
> >
> > I wonder the same. I don't see the difference between this and shout smart characters.
>
> so may be we could remove this and keep smart characters.
> Now that there is a setting we could try and see.
>
> Do you know where/why/who added this?  because I guess there is a reason that we don't see.

In fact I do not understand :) since ithought that the code was coming from cuis and cuis does not
implement it at all. may this is evil autogenerating code :)

Stef
_______________________________________________
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: bad bracket autocompletion in Pharo Core 1.2

Igor Stasenko
On 18 October 2010 21:44, Stéphane Ducasse <[hidden email]> wrote:

>>
>> > On Sun, Oct 17, 2010 at 10:51 AM, Stéphane Ducasse <[hidden email]> wrote:
>> > I have a question:
>> >        does shout support closing parenthesis behavior?
>> >
>> >
>> >
>> > I wonder the same. I don't see the difference between this and shout smart characters.
>>
>> so may be we could remove this and keep smart characters.
>> Now that there is a setting we could try and see.
>>
>> Do you know where/why/who added this?  because I guess there is a reason that we don't see.
>
> In fact I do not understand :) since ithought that the code was coming from cuis and cuis does not
> implement it at all. may this is evil autogenerating code :)
>

Maybe Pharo runs some hidden AI process, which refactors and changes
things under the hood? :)

> Stef
> _______________________________________________
> 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: bad bracket autocompletion in Pharo Core 1.2

Stéphane Ducasse
In reply to this post by Stéphane Ducasse
>>
>>
>
> Maybe Pharo runs some hidden AI process, which refactors and changes
> things under the hood? :)

If we could educate it to autofix it this would be a clear win-win situation :)

Seriously guillermo how this code arrived in since it is not in CUIS?

Stef
_______________________________________________
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: bad bracket autocompletion in Pharo Core 1.2

Guillermo Polito


On Tue, Oct 19, 2010 at 8:19 AM, Stéphane Ducasse <[hidden email]> wrote:
>>
>>
>
> Maybe Pharo runs some hidden AI process, which refactors and changes
> things under the hood? :)

If we could educate it to autofix it this would be a clear win-win situation :)

Seriously guillermo how this code arrived in since it is not in CUIS?

I've no idea, hehe.  I don't know when this change was introduced.  I have a 1.2 Core version #12121 which already has this piece of code.  But it's previous the SmalltalkEditor integration.
 
I vote to remove that ugly autocompletion :).


Stef
_______________________________________________
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