On 5 May 2011 22:46, Thierry Lebourque <[email protected]> wrote:
> In my opinion, completion should not select anything when activated
> automatically, it is only suggestion. It is the user who choose to use
> it or not, by using tab or arrow, for example. If the completion is
> requested intentionally it should behave as described by Doru.
>
Yes, it should not select anything (even if there's only choice),
and only if user pressing keys to select an item from drop-down list
(like up/down/tab),
then selection should be enabled.
Otherwise autocompletion should just hang around and not interfere
with user's input until he typed mentioned keys,
which effectively changes input focus to a menu instead of text editor.

> I have used quite a lot of different IDE, and sometimes I find the
> Pharo completion quite disturbing.
>
> But as Stéphane said, it could maybe become a setting.
>
> 2011/5/5 Stéphane Ducasse <[email protected]>:
>> yes I asked romain to bind the auto complete to enter and we removed it.
>> Now probably having one setting would be good.
>>
>> Stef
>>
>> On May 5, 2011, at 6:00 PM, Tudor Girba wrote:
>>
>>> Hi,
>>>
>>> This is not great at all. Please read this before going forward.
>>>
>>> We had this in OCompletion before and then it got changed to not use CR for 
>>> a reason. The problem is when using fluent APIs that are best read when 
>>> written on multiple lines. For example, suppose that I want to type 
>>> something like this in Glamour:
>>>
>>> ...
>>>       a tree
>>>               display: [ ... ]
>>>
>>> After typing "a tree", the first proposed item is "treeLayout" (see the 
>>> attached picture). If I press enter to go to the next line "tree" is 
>>> replaced with "treeLayout" and this is not the behavior I want.
>>>
>>> The problem is that CR has a useful meaning when typing a piece of text and 
>>> this makes it not good as a completion character. Tab on the other hand, is 
>>> only used in Smalltalk at the beginning of an empty line so there is no 
>>> danger of overloading its functionality in the middle of a text.
>>>
>>>
>>> Now, if you insist, I still believe there is a place for CR. Completion has 
>>> two modes:
>>> 1. one in which I write and the completion offers me something, and
>>> 2. one in which I am after I press the down arrow to select some completion 
>>> item.
>>>
>>> For 1. you do not want to have CR as a completion character. For 2. it is 
>>> probably ok because you enter explicitly in a temporary mode and thus you 
>>> are not typing anymore and this will not induce the conflict.
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>> <example-glamour-fluent-api.png>
>>>
>>>
>>>
>>> On 5 May 2011, at 17:37, Thierry Lebourque wrote:
>>>
>>>> That is really great!
>>>> Many thanks
>>>>
>>>> 2011/5/5 Igor Stasenko <[email protected]>:
>>>>> Hi, i just found inconvenient that for autocompletion i should press
>>>>> tab all the time
>>>>> while i tend to always hit enter, which instead of pasting suggestion,
>>>>> inserts cr into text.
>>>>>
>>>>> So i hacked a lil piece of code to make autocompletion to insert
>>>>> suggested text when you pressing either tab or cr
>>>>>
>>>>> --
>>>>> Best regards,
>>>>> Igor Stasenko AKA sig.
>>>>>
>>>>
>>>
>>> --
>>> www.tudorgirba.com
>>>
>>> "Reasonable is what we are accustomed with."
>>>
>>
>>
>>
>
>



-- 
Best regards,
Igor Stasenko AKA sig.

Reply via email to