wx.stc: autocomplete behaviour

Hello, three questions:

Starting point:

fr<fire up autocomplete>

possbile list:
fra
frb
frb1
frb2
frb31
frb32
frc1
frc2
frc2
frc3
frc4
frc5
frc6

1) if i type the letter 'd', which is not in the auto completion list,
the autocomplete listbox should not be closed (It should also not accept
this keystroke; so ignore them)

2) if i type 'b', only frb1, frb2 and frb31 and frb32 should be visible
(available) in the listbox. If I go back with backspace, (after 'frb3',
the matching completitions (here frb* should be displayed again).

3) I have typed "frb" and press backspace, the autocomplete dialog will
be closed.
(I think, it should close only then, if the typed string is
shorter, than, when i started autocomplete)
fr<start>
frb<backspace>(it is closed actually)
fr<backspace>(now it should close)

or is it better to ask in the scintilla.devel mailing list?
Or is the only way around to write an own autocomplete dialog?

thank you in advance!

···

--
Franz Steinhaeusler

Franz Steinhäusler wrote:

Hello, three questions:

Starting point:

fr<fire up autocomplete>

possbile list:
fra
frb
frb1
frb2
frb31
frb32
frc1
frc2
frc3
frc4
frc5
frc6

1) if i type the letter 'd', which is not in the auto completion list, the autocomplete listbox should not be closed (It should also not accept
this keystroke; so ignore them)

Scintilla doesn't take this approach, it allows you to type things that are not in the AutoComp list.

2) if i type 'b', only frb1, frb2 and frb31 and frb32 should be visible
(available) in the listbox. If I go back with backspace, (after 'frb3',
the matching completitions (here frb* should be displayed again).

For the similar reasons the AutoComp list is not filtered. This allows you to type something and if you get it wrong you can then cursor up/down to the right thing.

3) I have typed "frb" and press backspace, the autocomplete dialog will
be closed. (I think, it should close only then, if the typed string is
shorter, than, when i started autocomplete)
fr<start>
frb<backspace>(it is closed actually)
fr<backspace>(now it should close)

I think this is controled by AutoCompSetCancelAtStart:

     // Should the auto-completion list be cancelled if the user backspaces to a
     // position before where the box was created.
     void AutoCompSetCancelAtStart(bool cancel);

so you could set this to False and then cancel the AutoComp when you want it to be canceled.

or is it better to ask in the scintilla.devel mailing list?

That's where the experts are.

Or is the only way around to write an own autocomplete dialog?

For #1 and #2, yes you would have to create your own.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Hi Robin,

[...]

1) if i type the letter 'd', which is not in the auto completion list,
the autocomplete listbox should not be closed (It should also not accept
this keystroke; so ignore them)

Scintilla doesn't take this approach, it allows you to type things that
are not in the AutoComp list.

Thank you for your answer,

It is a litte bit annoying, when you mistyped a letter, the autcomplete
vanishes. for me, it would enough to quit it by Enter Key or escape.

2) if i type 'b', only frb1, frb2 and frb31 and frb32 should be visible
(available) in the listbox. If I go back with backspace, (after 'frb3',
the matching completitions (here frb* should be displayed again).

For the similar reasons the AutoComp list is not filtered. This allows
you to type something and if you get it wrong you can then cursor
up/down to the right thing.

Ok this is not soo tragic.

3) I have typed "frb" and press backspace, the autocomplete dialog will
be closed.
(I think, it should close only then, if the typed string is
shorter, than, when i started autocomplete)
fr<start>
frb<backspace>(it is closed actually)
fr<backspace>(now it should close)

I think this is controled by AutoCompSetCancelAtStart:

This I already tried, but wheter setting this value to 0 or 1 (false or
true), it shows no affect.
This behaviour, I find inconvenient.

    // Should the auto-completion list be cancelled if the user
backspaces to a
    // position before where the box was created.
    void AutoCompSetCancelAtStart(bool cancel);

so you could set this to False and then cancel the AutoComp when you
want it to be canceled.

or is it better to ask in the scintilla.devel mailing list?

That's where the experts are.

Or is the only way around to write an own autocomplete dialog?

For #1 and #2, yes you would have to create your own.

So I'm thinking of creating an own complete dialog.
I consider it not to be too difficult.

···

--
Franz Steinhaeusler