Author |
Topic |
|
pwaugh
Ketchup Master
USA
68 Posts |
Posted - Apr 10 2007 : 08:59:34 AM
|
Hi,
I notice that when I get my selection list after typing the dot:
if ( cbIgnEng.Closed() ) { }
and I select "Closed" from the list of public methods, it doesn't put the parenthesis, while it does in other objects.
Why?
|
Programming in C++
VA_X.dll 10.4.1626.0 Built 2008.01.17
(1-user license) Support ends 2009.01.29
DevEnv.exe version 9.0.21022.8 msenv.dll version 9.0.21022.8 Comctl32.dll version 6.0.2900.2982 Windows XP 5.1 Build 2600 Service Pack 2 Single processor Platform: Win32
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Apr 10 2007 : 09:10:22 AM
|
Which language are your programming in? Are you looking a completion listbox or a suggestion listbox? |
zen is the art of being at one with the two'ness |
|
|
pwaugh
Ketchup Master
USA
68 Posts |
Posted - Apr 10 2007 : 2:32:15 PM
|
quote: Originally posted by feline
Which language are your programming in?
C++
quote: Are you looking a completion listbox or a suggestion listbox?
It is the box that comes up when I attempt to enter the code, so whichever one that is.
The behavior is consistent for this object, and I note that VAX thinks the symbol is "mistyped" as it is underlining it in the color I have set for that behavior in VAX Options.
*Ignore my lack of ';' line should be: bool Engine::IgnitorsOn(){ return cbIgnEng.Closed(); }
The header is this:
class CircuitBreaker { public: CircuitBreaker(float);
bool PowerAvailable();
bool Open(); bool Closed(); bool OverLoaded();
void SetOpen(); void SetClose(); void Toggle();
void Overload(); void Repair(); private:
float m_amps; bool m_isOpen; bool m_isOverLoaded;
bool IsPowerAvail(); };
extern CircuitBreaker cbIgnEng;
And releveant definition:
bool CircuitBreaker::Closed(){ return !m_isOpen; }
Not sure why it won't add the () like it does for my other objects, which are coded in the same way/style.
|
Edited by - pwaugh on Apr 10 2007 2:41:23 PM |
|
|
RickHodgin
Senior Member
44 Posts |
Posted - Apr 10 2007 : 3:41:30 PM
|
I have seen this behavior also, though sporadically. I have not been able to identify the cause. I am also in C++ (Visual Studio 2005 Prof). |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Apr 12 2007 : 11:04:01 AM
|
Both suggestion and completion listboxes will appear when typing. For now lets focus on this underlining, this is probably the root problem.
If you place the caret in "cbIngEng" what does VA show in its context and definition fields? What happens when you use alt-g to jump to the declaration of this variable?
Using the class definition here VA understands the class, so I am wondering if it does not understand the variable. |
zen is the art of being at one with the two'ness |
|
|
pwaugh
Ketchup Master
USA
68 Posts |
Posted - Apr 12 2007 : 11:25:53 AM
|
Unfortunately (but fortunately!), it is now working. I think it may be a "bug" in VS itself, as the problem has completely disappeared when I closed and restarted the IDE.
It neither underlines it, nor has a problem with the '()' now on that class.
If it happens again, I will find the answers to the above questions.
|
Programming in C++
VA_X.dll 10.4.1626.0 Built 2008.01.17
(1-user license) Support ends 2009.01.29
DevEnv.exe version 9.0.21022.8 msenv.dll version 9.0.21022.8 Comctl32.dll version 6.0.2900.2982 Windows XP 5.1 Build 2600 Service Pack 2 Single processor Platform: Win32
|
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Apr 12 2007 : 11:37:23 AM
|
I am wondering if somehow VA simply had not parsed the correct file. If you see similar problems in the future try triggering a manual re-parse of the file that defines the variable.
VAssistX -> Tools -> Reparse Current File
|
zen is the art of being at one with the two'ness |
|
|
pwaugh
Ketchup Master
USA
68 Posts |
Posted - Apr 12 2007 : 5:09:52 PM
|
That is entirely possible and likely, because at time I was moving things from one object to another, and I have a feeling what happened was VAX got confused about where stuff was at.
Thanks for the tip.
|
Programming in C++
VA_X.dll 10.4.1626.0 Built 2008.01.17
(1-user license) Support ends 2009.01.29
DevEnv.exe version 9.0.21022.8 msenv.dll version 9.0.21022.8 Comctl32.dll version 6.0.2900.2982 Windows XP 5.1 Build 2600 Service Pack 2 Single processor Platform: Win32
|
|
|
|
Topic |
|