Author |
Topic |
|
sean.flook@aligned-assets
New Member
United Kingdom
4 Posts |
Posted - Dec 13 2007 : 07:44:37 AM
|
I have just upgraded my copy of VA and I am now experiencing a very annoying new "feature" The auto complete looks to be working when I type a space so if I am trying to typing the following:
hc 9204 Further changes to call script to fix the tablespaces for tables and indexes after importing a dump file to another schema name.
what I actually get is:
hc 9204 Further changes ctor call script ctor fix the tablespaces for tables and indexes after importing abstract dump file ctor another schema name.
In VA Options > Advanced > Listboxes I have only got the Selections committed with Enter checked, all the other options are unchecked. |
Sean Flook |
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Dec 13 2007 : 08:34:51 AM
|
Are you trying to type a comment or literal string? That does not look like normal code to me.
If so can you try turning On:
VA Options -> Advanced -> Correction -> Repair case
There is a known bug where suggestions appear while typing in comments or literal strings when Repair case is turned off.
case=10480 |
zen is the art of being at one with the two'ness |
|
|
sean.flook@aligned-assets
New Member
United Kingdom
4 Posts |
Posted - Dec 13 2007 : 08:47:11 AM
|
I have QuickCode installed so this will be converted into a comment once I have pressed the shortcut key to convert it.
I already have the Repair case turned on, I had already read that post in the forum and checked that setting.
I am now getting this for a lot of my template codes, this was not happening with previous versions of VA. |
Sean Flook |
|
|
smeuser
Senior Member
Germany
31 Posts |
Posted - Dec 13 2007 : 09:52:42 AM
|
Sorry, to jump in the thread, but it seems that I have the same problem here with normal code.
If I take the following lines (empty project no other add-ins enabled)
#include <string>
using namespace std:
string x; const char* y = x.c
after entering the 'c' an suggestion appears (with an A-> below) to take c_str(). Pressing Space (or other keys which are not valid in a symbol) will complete it. Since I have 'Selection committed with' set to Enter and Tab, I would expect not to complete.
BTW, in my "real" case, it's event worse: instead of suggesting c_str() which would be what I want, it suggests a type C_String (which is one of our own classes). This I cannot reproduce in a test project.
Question: Is there another option responsible for completing the symbols?
VA_X.dll file version 10.4.1623.0 built 2007.12.04
|
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Dec 13 2007 : 1:48:32 PM
|
Sean can you post a screen shot of the listboxes you are seeing? Something odd is going on here.
smeuser when you type the dot you should get a Member listbox, not a Suggestion listbox. But the icon you describe is only present on a suggestion listbox.
When you type dot or arrow after a variable you are actually triggering a member listbox, not a suggestion listbox. If you do this in the IDE without VA installed you will find that the IDE accepts the current item in the listbox when you type any character not valid in a symbol.
The logic here seems to be that the listbox must be correct, so you obviously want to accept the current item.
Currently VA is doing the same thing the IDE does, for consistency. The option "Any character not valid in a symbol" only applies to suggestion listboxes, which only contain VA's best guess, and cannot be assumed to be always correct.
So in this case the question becomes, why are you seeing a suggestion listbox? |
zen is the art of being at one with the two'ness |
|
|
smeuser
Senior Member
Germany
31 Posts |
Posted - Dec 13 2007 : 4:36:00 PM
|
I have reproduced the problem in a fresh install of VAX in a VM. While investigating the problem, I noticed two things: 1. It does not always happen. But if it happens (in a file, at a certain location), it will happen again and again. It vanished after I played with the options 'Allow Acronyms' but it seems to happen independent from this option. If it does not display the suggestion box, VAX displays the completion list.
2. If it happens, the first entry is displayed selected (blue in my case). If usually the suggestion list is opened, nothing is selected
If you have a acronym (code snippet?) with 'to' meaning 'ctor' and just type the text of Sean in the editor (not as comment but like usual code) typing 'to' will open the suggestion list and if now space selects automatically the first entry, you have Sean's problem. (That was the reason, why I thought this may be identical problems, if you think not, it may be better to create a second thread).
If it helps, I have a screenshot and logfile from the worst case: Consider you have class C_String; Take a std::string and try to call the method c_str(); You type ok.c_str and at this point VAX suggest C_String (as the only suggestion). If I now press '(' to get c_str(), VAX completes to c_str(). The screenshot shows the suggestion of C_String in this case.
|
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Dec 14 2007 : 08:59:48 AM
|
Lets start with the std::string problem first. using VS2005 and VA 1624 I have added the following code to a cpp file:
static void testStringListbox()
{
std::string ok;
ok.|
}
When I typed the dot a member listbox appeared. As I typed "c_str" the listbox was filtered, and ended up showing three items:
It sounds like this item is never suggested in your case. If you show VA View and hover the mouse over the type "std::string" is c_str listed as one of the class members? |
zen is the art of being at one with the two'ness |
|
|
smeuser
Senior Member
Germany
31 Posts |
Posted - Dec 14 2007 : 2:40:55 PM
|
Sometimes it shows the same listbox like yours (it shows in this case only c_str since all other don't match). Then everything is fine. But sometimes, it looks like this:
(This is the second problem, but think of the same box, just with c_str() as content - everything else looks identical).
If I see the suggestion with c_str, clicking on the A-> or pressing Ctrl+Space shows the completion list as expected.
But if I get the C_String in the suggestion, completion will simply not work. It seems, that he does not know "ok". If I declare another string, this string will have the correct completion box (similar to yours), but the ok string still does not. If I delete the word ok, and type it again, it seems to be working again (showing the completion box with c_str and all other string members). (I tried everything above while typing the email, so it was reproducable in the project since yesterday, but after deleting the ok and retyping it, I don't get the problem again. Yesterday it take about an hour of editing to get the problem in such a simple case...). |
|
|
smeuser
Senior Member
Germany
31 Posts |
Posted - Dec 14 2007 : 2:50:41 PM
|
Sorry, to answer your question: VA View shows the string symbols and also the function c_str() while hovering over "ok" (in the line where I try to edit the .c_str()).
BTW, the problem reappeared after not saving the project and opening it again. So I can make it go away, by deleting the "ok" in the line and re-typing it, and it comes back if I reload the original project. (At least it worked twice this way...) |
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Dec 14 2007 : 3:19:22 PM
|
So VA understands the type std::string, which is good news. The original project, is this your main project or a small test project? When you load it, and you have reproduced the problem, if you sit on the variable "ok" where you see the problem what does VA show in the context and definition fields? If you press alt-g what happens?
Initially I am just searching for clues. Clearly there is something going wrong here. |
zen is the art of being at one with the two'ness |
|
|
smeuser
Senior Member
Germany
31 Posts |
Posted - Dec 14 2007 : 3:59:15 PM
|
The screenshot is from a test project. Basically, you see nearly the complete source code on the screenshot. The problem of course happen in different flavours in real project. The annoying thing is always, that pressing '(' will start an unwanted completion by VAX to something different. Sometimes, the completed name is a correct and existing function which contains the typed and wanted function (example (not real): x.getIndex( is completed to x.getIndexByName()). Sometimes it is completely wrong as in the shown case. This happens not very often, and it happens for a longer time (I cannot say, it was introduced by one the newer versions).
What do you mean by context and definition fields? The fields at the top of editor? Left shows f.ok, right shows directly after suggestion const std::string ok and after closing suggestion with ESC its blank.
Alt-g jumps to the function header (void f( const std::string ok))
It looks to me, as if VAX thinks that we are at the beginning of a new statement. Pressing ok.c suggests: C_String, char, class, const Pressing ok.v suggests: void Pressing ok.f suggests: f (the function) ok.i -> int ok.n -> namespace ok.o -> operator ok.p -> public ok.r -> return ok.s -> std ok.u -> using
|
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Dec 15 2007 : 08:08:37 AM
|
The context and definition fields are indeed the ones at the top of the editor window, they are where the alt-m list appears.
You statement:
>> It looks to me, as if VAX thinks that we are at the beginning of a new statement.
makes perfect sense. I agree. But I don't understand why VA thinks that. The information in the definition field shows that VA thinks "ok" is a variable, and it has a known type. So VA should be suggesting the correct items.
You are seeing this, some of the time at least, in a test project. How easily can you reproduce this in a test project? I am wondering if you can send me the test project along with your IDE and VA settings. I can then try and reproduce the problem here.
VA Options -> Performance -> Export Settings IDE tools menu -> Import and Export Settings -> Export selected environment settings
Which OS, IDE and version of VA are you using? The closer I can get to your system, hopefully the more likely it will be that I can reproduce the problem. |
zen is the art of being at one with the two'ness |
|
|
smeuser
Senior Member
Germany
31 Posts |
Posted - Dec 15 2007 : 2:34:27 PM
|
I can send you the testproject as well as all the settings. The test is running in a virtual machine - in principle I could even send you the vm (if I could reduce the size enough). In the current state of the testproject it will always happen. More difficult for me was to reproduce the problem at first in a testproject, now it is always there.
Where should I send you the project and settings?
|
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Dec 17 2007 : 07:21:00 AM
|
Thank you for this. Please submit the files via the form:
http://www.wholetomato.com/support/contact.asp
including this thread ID or URL in the description, so we can match it up. |
zen is the art of being at one with the two'ness |
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Dec 18 2007 : 08:41:38 AM
|
I have the files, thank you for these. I am able to reproduce the problem simply by opening the project, no need to import your VA or IDE settings.
After adding some empty function bodies in your class the code compiles perfectly, but VA just does not know what to suggest. So there are no syntax errors or mistyped symbols confusing things. It just does not work. Now I just need to try and find out why. |
zen is the art of being at one with the two'ness |
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Dec 18 2007 : 09:31:07 AM
|
smeuser I have found the problem. In your test project this is going wrong because VA does not understand parameters of type "const std::string". Normally you could trigger a member listbox via CTRL-SPACE, but since you have renamed / removed feacp.dll this no longer works:
case=9784
I have increased the priority on this bug, since this is clearly causing more problems that I at first realised.
If this is the only problem you are seeing then you should only run into this problems when working on "const std::string" or "const std::string &" parameters to functions.
Are you seeing this problem in other situations as well? Or only with these parameters? |
zen is the art of being at one with the two'ness |
|
|
smeuser
Senior Member
Germany
31 Posts |
Posted - Dec 18 2007 : 09:47:49 AM
|
I cannot say, if I have seen the "same" problem with different types. The last I remember was "const std::string&". I have had different functions which were completed wrongly (similiar to this one), but since I normally don't trace, why it happens but just curse on the "stupid software" and correct the wrong word, I cannot say if it were for the same reason. At least, errors in the source may confuse the parser so that the suggestion is wrong. I would prefer, that pressing '(' will never complete automatically (as an option), at least as long as one cannot guarantee, that the completion is correct.
|
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Dec 18 2007 : 12:08:17 PM
|
sean flook I have your screen shots, thank you for these. I did not realise you were working in C#. The rules are slightly different in C#, but I am seeing the same problem, now I am running the correct test:
case=10695
You may find turning on:
VA Options -> Advanced -> Suggestions -> Include VA Snippets in listboxes
helps. Snippets are not being accepted with a space in C# listboxes. On my test system I have a snippet with a shortcut "to" which is showing up as the default item in the listbox, thus stopping "to" being converted to "ctor". Alternatively typing comments, so starting the line with //, rather than typing "code" should help. While typing a comment you can still press CTRL-SPACE to get a listbox to help you complete type names, if this is what you are looking for. |
zen is the art of being at one with the two'ness |
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Dec 18 2007 : 12:14:37 PM
|
smeuser there is another recent thread where we have people reporting incorrect, and unhelpful, suggestion listboxes getting in the way, so there may be another problem at work here. So far though I don't have enough details to know if there is or not:
http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=7066
The question of when listboxes are accepted, we are looking to apply the VA option about accepting a suggestion list with "Any character not valid in a symbol" to all listboxes, which is one thing you are asking for here:
case=9369
Listboxes should be showing sensible things. Easy to say, but perhaps harder to do. If you notice this going wrong on any variable that is not a string I would certainly be very interested. |
zen is the art of being at one with the two'ness |
|
|
sean.flook@aligned-assets
New Member
United Kingdom
4 Posts |
Posted - Dec 19 2007 : 02:23:33 AM
|
I already have the VA Options -> Advanced -> Suggestions -> Include VA Snippets in listboxes checkbox checked.
I have tried it with this checked and with it unchecked and it does not make any difference. |
Sean Flook |
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Dec 19 2007 : 08:38:34 AM
|
Interesting. Something strange is happening on my test system. I have something that VA claims is a VA snippet in my listbox, with the shortcut "to", but it is not listed in the VA snippet editor.
I have added a new C# VA Snippet with the shortcut "to" that inserts the code "to". Now when I type I am seeing this:
Not a perfect solution, but you might find this is a suitable work around for now. |
zen is the art of being at one with the two'ness |
|
|
sean.flook@aligned-assets
New Member
United Kingdom
4 Posts |
Posted - Dec 19 2007 : 08:59:13 AM
|
Thanks for that, it does help. |
Sean Flook |
|
|
sean
Whole Tomato Software
USA
2817 Posts |
Posted - Jan 18 2008 : 11:09:16 AM
|
case=9784 is fixed in build 1626 |
Edited by - sean on Jan 18 2008 11:09:40 AM |
|
|
support
Whole Tomato Software
5566 Posts |
Posted - Apr 10 2008 : 01:26:28 AM
|
case=10480 is fixed in build 1632 |
|
|
support
Whole Tomato Software
5566 Posts |
Posted - Dec 01 2008 : 07:41:31 AM
|
case=10695 is fixed in build 1707 |
|
|
support
Whole Tomato Software
5566 Posts |
Posted - Aug 04 2010 : 5:39:04 PM
|
"Selections committed with" behavior for member lists is now configurable under VA Options | Advanced | Listboxes. (case=9369), implemented in build 1829. |
Whole Tomato Software, Inc. |
|
|
|
Topic |
|