Autocomplete on zero selection with length 1 member list

SyntaxEditor for Windows Forms Forum

Posted 18 years ago by Joris Koster - Paragon Decision Technology
Avatar
I'm not sure what is right or wrong in this case; suppose that one has a namespace 'MyNamespace' with only 1 member 'MyMember' in it. Next I'm typing that 'MyNamespace' followed by a dot; what would the CompleteWord method do (assuming I feed the memberlist with that 1 member only) ?

According to the help it 'performs an auto-complete if the text with which the member list is initialized causes a single selection', and therefore I would expect the 'MyMember' to be immediately completed, since it is the one and only possibility. On the other hand, one could argue that a nil string only matches an empty list... Right now the implementation seems the latter, since a memberlist of lenght 1 is shown.

As a sidenote: I think this falls in the same category as having a typo in the supposed member-item that would otherwise be uniquely matched. (e.g. have the memberlist 'chapel cheer church' while invoking the CompleteWord on 'chaos' it would alter 'chaos' into 'chapel' :) ).

I have no problem with the current implementation, but it might be nice to extend the CompleteWord functionality with an extra boolean argument or member-var 'CorrectOnUniqueMatch' that triggers the auto-correcting.

Comments (1)

Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Joris,

SyntaxEditor works the way Visual Studio does, which I believe to be most intuitive. If you hit a "." after a namespace you are indicating that you want to "list the members" of the namespace. Therefore it shows the list even if there is only one item.

For complete word, complete word requires at least one matching character to an item in the list to be able to match anything. If you haven't typed anything yet, then it will act like "list members". Visual Studio operates the same way.

Also the case sensitivity thing is resolved in the upcoming maintenance release.


Actipro Software Support

The latest build of this product (v24.1.0) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.