Author |
Topic  |
|
.oisyn
Tomato Guru
    
169 Posts |
Posted - Jul 26 2010 : 12:14:23 PM
|
I'm seeing this in a project of ours. Somewhere I type the following:

Those are valid entries, but this is nowhere near the complete list, which consists of roughly 40 entries, all beginning with g_cdcScene_. But that's ok, since I assume this is a reduced list which definitions I'm most likely to use at that point.
So, I press ctrl-space. The list now shows this:

I'm flabbergasted. Where are all the variables I can use? The three from the previous list aren't even in there, and instead it shows a suggestion that doesn't even begin with the characters that I've typed.
I can't really reproduce this in an isolated case, but it is 100% reproducable in this particular case, even after restarting the IDE and updating to a newer VAX. I'm using VAX 1827 (above screenshots are made with 1810) |
|
accord
Whole Tomato Software
    
United Kingdom
3287 Posts |
Posted - Jul 26 2010 : 1:08:59 PM
|
This is odd. Ctrl+space should list all symbols, accessible from here. I tried this in some cases and worked. I'm wondering whether we could reproduce this problem, by placing thoose 40 symbols plus the erroneous symbol on the second screenshot to a new test project. The success should depend on what symbol names are available.
Update: forget to add but you can press up or down arrow to get more suggestions. Ctrl+space lists all symbols while up/down often results in more appropriate symbol names. |
Edited by - accord on Jul 26 2010 3:44:46 PM |
 |
|
.oisyn
Tomato Guru
    
169 Posts |
Posted - Jul 27 2010 : 06:26:45 AM
|
Up/down doesn't enlarge the list with other entries. The funny thing is, VAX does recognize the other symbols. If I start typing one of them, it eventually suggests to complete it. But when it does, after pressing ctrl-space, even that suggestion is gone and it finds nothing.
.edit: hmm, perhaps a thing that's related to the issue: all those variables are defined by a macro rather than a normal C++ definition. And the expansion depends on the project setting - they are either defined as constants with basic types (int, bool) for final builds, or as class instances for debug and release builds. |
Edited by - .oisyn on Jul 27 2010 06:29:54 AM |
 |
|
accord
Whole Tomato Software
    
United Kingdom
3287 Posts |
Posted - Jul 27 2010 : 1:26:29 PM
|
Is the following option turned on or off?
VA Options -> Advanced -> Listboxes -> Get content from default Intellisense
Can you please post the source of such a macro? (which generates variable)
Have you turned off limitmacro by the following instructions? http://docs.wholetomato.com?W363 |
Edited by - accord on Jul 27 2010 1:29:04 PM |
 |
|
.oisyn
Tomato Guru
    
169 Posts |
Posted - Jul 28 2010 : 06:26:09 AM
|
I managed to produce an isolated testcase! :)
#if _DEBUG
template<class T>
class Option
{
public:
void SomeMember();
};
#define OPTION_DECL(type, var, value) \ extern Option<type> var; \ typedef type var##_type; \ static const type var##_value = value;
#else
#define OPTION_DECL(type, var, value) \ static const type var = value;
#endif
OPTION_DECL(int, prefix_option1, 1);
OPTION_DECL(int, prefix_option2, 2);
OPTION_DECL(int, prefix_option3, 3);
int main()
{
prefix_
}
During the typing of prefix_ in main, it shows the list. Pressing ctrl-space will list other symbols nothing to do with those variables.
Contents from default intellisense is turned off, and I have taken the macro limit steps (the original code had nested macros, but as this example clearly shows that doesn't really matter) |
Edited by - .oisyn on Jul 28 2010 06:29:08 AM |
 |
|
.oisyn
Tomato Guru
    
169 Posts |
Posted - Jul 28 2010 : 06:30:52 AM
|
Oh, as a matter of fact, the macros don't have anything to do with it.
int prefix_option4;
int prefix_option5;
int prefix_option6;
int main()
{
prefix_
} Same problem. Looks like ctrl-space isn't working in general for globals. If the variables are in a class or namespace, and you type Foo::prefix_ <ctrl-space>, it shows the variables correctly.
Also, without the namespace, if you type ::prefix_ it is also incorrect.
Within a namespace (without explicitely specifying the namespace) it works correctly as well:
namespace Test
{
int prefix_option4;
int prefix_option5;
int prefix_option6;
int main()
{
prefix_
}
}
So the bug seems to be only applicable to symbols in the global namespace. |
Edited by - .oisyn on Jul 28 2010 06:34:49 AM |
 |
|
accord
Whole Tomato Software
    
United Kingdom
3287 Posts |
Posted - Jul 30 2010 : 03:59:02 AM
|
I am seeing the same effect here. Thank you for the very clear description.
case=48025 |
 |
|
support
Whole Tomato Software
    
5566 Posts |
Posted - Sep 20 2010 : 10:16:00 PM
|
case=48025 is fixed in build 1832 |
Whole Tomato Software, Inc. |
 |
|
|
Topic  |
|