Author |
Topic |
|
architekt
Ketchup Master
USA
51 Posts |
Posted - May 12 2010 : 4:05:57 PM
|
We have a class called Graphics in our framework. I can't recall when, but at some point I upgraded VAX recently and it started giving me the wrong member information whenever I'd begin typing out -> from a graphics object. I'm presently on Visual Studio 2008 with VAX 10.6.1823. It's giving me completion information for the GDI graphics class, it looks like (which isn't actually included in our framework, and even if it were, they are in different namespaces). If I turn on the option to use Intellisense tooltips instead, the correct class members show up instead. |
|
feline
Whole Tomato Software
United Kingdom
19003 Posts |
Posted - May 13 2010 : 1:13:10 PM
|
If you use Alt-G on a class instance what happens? Are you taken to the correct line, or to some other line?
If you show VA View, then place keyboard focus back into the editor, and now hover the mouse over the class name Graphics is the correct information displayed in the bottom half of VA View?
If you use Alt-G on the class name Graphics what happens? Are you taken to your class or are you taken to some other class?
Can you please go to:
VA Options -> System Info -> Copy Info
and paste the details (from the clipboard) into your reply. This will give us the basic information about your setup. |
zen is the art of being at one with the two'ness |
|
|
architekt
Ketchup Master
USA
51 Posts |
Posted - May 13 2010 : 3:04:14 PM
|
I've got an object declared as: "Graphics* g". When I type in g-> I selected a random incorrect method name, in this case "DrawRectangle", and hit alt-g. The results are:
Which is incorrect and showing the GDI version. Selecting one of those takes me to the indicated spot in the file. In regards to VAV, no, it shows the GDI version as well.
Info pasted: VA_X.dll file version 10.6.1823.0 built 2010.05.06 Licensed to: VA X: [email protected] (1-user license) Support ends 2011.02.22 DevEnv.exe version 9.0.30729.1 msenv.dll version 9.0.30729.1 Font: Courier 16(Pixels) Comctl32.dll version 6.10.7600.16385 Windows 7 6.1 Build 7600 4 processors (x86-64; WOW64)
Platform: Win32 Stable Includes: C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\include; C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\include; C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\include; C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\include; C:\\Program Files (x86)\\Microsoft DirectX SDK (August 2007)\\Include;
Other Includes:
Stable Source Directories: C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\mfc; C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\mfcm; C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\atl; C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\crt\\src;
When I hover over the Graphics definition in VAV it shows that it's coming from that Windows SDK directory. Why there are 2 dupes in my stable directories list I don't know but I can't seem to make any changes there. |
|
|
feline
Whole Tomato Software
United Kingdom
19003 Posts |
Posted - May 20 2010 : 2:33:16 PM
|
Many apologies for the delay in getting back to you about this. On the line of code:
Graphics* g
what happens when you use Alt-G on Graphics ?
I have just set up a simple test case here in VS2008, and I am offered my local class called "Graphics", but also the Microsoft SDK Graphics's class.
Is this what you are seeing, or is VA taking you directly to the SDK class? |
zen is the art of being at one with the two'ness |
|
|
architekt
Ketchup Master
USA
51 Posts |
Posted - May 20 2010 : 2:37:38 PM
|
alt-g with both get contents from intellisense turned on as well as off takes me to my class' implementation. I am not given a choice of another graphics class. Again though, with intellisense disabled via VAX options, the wrong members get listed in the suggestion box but the right ones are listed if I turn on the intellisense option. |
|
|
feline
Whole Tomato Software
United Kingdom
19003 Posts |
Posted - May 20 2010 : 5:16:24 PM
|
Are you talking about the VA option:
VA Options -> Advanced -> Listboxes -> Get content from default Intellisense
here? You mentioned a tooltip option in your first post, which is confusing me.
Since alt-g on the type is taking you to the correct class, I am not sure why the listbox content is wrong.
If you show VA View, then place keyboard focus back into the editor, and now hover the mouse over the class name "Graphics" is the correct information displayed in the bottom half of VA View? |
zen is the art of being at one with the two'ness |
|
|
architekt
Ketchup Master
USA
51 Posts |
Posted - May 20 2010 : 5:27:30 PM
|
Ya, that's the option I'm talking about, not sure why I said tooltip.
Regarding VA View: Yes, it shows the correct class with the above option enabled as well as disabled. It seems like it's just the listbox of suggestions that's incorrect with the intellisense content disabled. |
|
|
feline
Whole Tomato Software
United Kingdom
19003 Posts |
Posted - May 20 2010 : 6:44:44 PM
|
This does not make much sense, since VA clearly understands the type "Graphics".
Can you try the following test variables please:
Graphics felineTestGraphics1; Graphics * felineTestGraphics2; Graphics & felineTestGraphics3 = felineTestGraphics1;
felineTestGraphics1; felineTestGraphics2; felineTestGraphics3;
and see what happens when you type a dot after each of the variables. I am wondering if the variable name is somehow a factor here. |
zen is the art of being at one with the two'ness |
|
|
architekt
Ketchup Master
USA
51 Posts |
Posted - May 20 2010 : 6:46:39 PM
|
All 3 show the incorrect listbox suggestions, same as my "Graphics* g" variable. |
|
|
architekt
Ketchup Master
USA
51 Posts |
Posted - May 20 2010 : 6:53:38 PM
|
Maybe this additional info helps? If I accept one of the incorrect suggestions, say the first one which is "AddMetaFileComment", after I type the first ( the VA tooltip starts showing the parameter list for the GDI AddMetaFileComment method. If I right click on that AddMetaFileComment function and select go to definition or declaration, I get the error "The symbol 'AddMetafileComment' is not defined." |
|
|
feline
Whole Tomato Software
United Kingdom
19003 Posts |
Posted - May 21 2010 : 2:19:18 PM
|
Using the text code I posted, can you please try Alt-G on each of the three variables, where they are used. VA should take you back to the declarations.
Assuming it does, what does VA show in the context and definition fields, normally at the top of the editor, when you place the caret into these variable names?
If you show VA View, then place keyboard focus back into the editor, and now hover the mouse over each of the variables in turn is the correct information displayed? |
zen is the art of being at one with the two'ness |
|
|
architekt
Ketchup Master
USA
51 Posts |
Posted - May 21 2010 : 3:39:31 PM
|
Yes on all 3 with the intellisense option disabled it takes me back to the 3 declaration points. As for the top of the editor, I get the following for your 3 objects:
Board.Draw.felineTestGraphics1 / Graphics felineTestGraphics1 Board.Draw.felineTestGraphics2 / Graphics * felineTestGraphics2 Board.Draw.felineTestGraphics3 / Graphics & felineTestGraphics3 = felineTestGraphics1
Regarding the VA View and hover: It's still showing the incorrect information, that is, the GDI graphic's member information.
The interesting thing is if I hover over the "Graphics" part of any of those "felineTestGraphics" declarations, THAT shows the correct class definition. But I mouse over any of the felineTestGraphics ones and it shows the GDI stuff instead. |
|
|
architekt
Ketchup Master
USA
51 Posts |
Posted - May 21 2010 : 3:42:13 PM
|
Hmmm, I wonder if VA is getting confused with the namespaces? I just tried declaring one of your test objects with the namespace in which my Graphics object is defined and for that one, hovering over the object showed the right information as well as the suggestion list box.
I am doing a "using" for my namespace. Do you think that maybe that's causing it to get messed up? |
|
|
feline
Whole Tomato Software
United Kingdom
19003 Posts |
Posted - May 24 2010 : 10:50:18 PM
|
Namespaces combined with a using namespace line was the missing piece. When I place my test class into a namespace and add a using namespace line I am able to reproduce the problem here:
case=44742
Going back, the problem does not show up in VA 1649, however VA 1649 does not know about the SDK Graphics class at all. So if you were using an earlier version of VA that did not understand the SDK class there would have been no class to clash with.
If you edit your VA settings, and set the platform to Custom you can remove the two SDK directory lines:
C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\include; C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\include;
from the directory list. This fixes the problem for me, but it might cause you problems since VA will no longer scan inside these directories by default:
http://www.wholetomato.com/products/features/directories.asp |
zen is the art of being at one with the two'ness |
|
|
architekt
Ketchup Master
USA
51 Posts |
Posted - May 25 2010 : 3:48:14 PM
|
That does fix the problem for me. I don't care about the SDK stuff so for me, this solution is fine. Thanks for the help. |
|
|
|
Topic |
|