| Author |  Topic  |  | 
              
                | jamesoKetchup Master
 
     
 
                United Kingdom83 Posts
 | 
                    
                      |  Posted - Oct 31 2007 :  06:23:54 AM     
 |  
                      | System::[ctrl-space]
 
 returns entries in the tlh from a #import msword.olb, but nothing from the CLR's System namespace.
 
 Doing:
 using namespace System;
 using namespace std;
 
 then replaces
 
 String^ str;
 
 with
 
 string^ str;
 
 Which isn't the same thing at all, and is getting very annoying!
 
 (I have other namespace problems - but they're all .net types inside MC++.  I've looked at creating a project which reproduces this problem, but it was too easy - literally creating a MC++ command line app, typing System::[ctrl-space] gives me the msword.olb methods again.  Since this was in a seperate solution, it suggests that the #import headers are being promoted to be system-wide incorrectly and therefore you won't see the same thing.  The compiler *doesn't* think the word namespace is available, but does think the system namespace is available)
 
 James
 
 
 
 |  | 
              
                | jamesoKetchup Master
 
     
 
                United Kingdom83 Posts
 | 
                    
                      |  Posted - Oct 31 2007 :  06:31:54 AM     
 |  
                      | Here's one: 
 
  
 Any ideas?
 
 James
 
 edit: This happens in an empty mc++ solution too
 |  
                      | Edited by - jameso on Oct 31 2007  06:34:24 AM
 |  
                      |  |  | 
              
                | felineWhole Tomato Software
 
      
 
                United Kingdom19247 Posts
 | 
                    
                      |  Posted - Oct 31 2007 :  11:37:54 AM     
 |  
                      | Your picture is not loading for me. 
 Are you using VS2003 or VS2005?
 
 Using VS2005 and a CLR C++ file I have added the code:
 
 
 static void testTypingString()
{
	using namespace System;
	using namespace std;
	str|
}
 At this point I have these 4 suggestions:
 
 
  
 Is this similar to what you are seeing?
 
 As a test I tried adding the two variables:
 
 
 	string strLowerCase;
	String strUpperCase;
 to the function and compiling the code.  It fails to compile, since "using namespace std" is invalid.  "std" is an unknown namespace.  This suggests I might be using the wrong IDE.
 |  
                      | zen is the art of being at one with the two'ness
 |  
                      |  |  | 
              
                | jamesoKetchup Master
 
     
 
                United Kingdom83 Posts
 | 
                    
                      |  Posted - Oct 31 2007 :  11:52:10 AM     
 |  
                      | I'm using VS2005 
 Try #include <vector> to get a std namespace
 
 I'll fix the image tonight, but it was
 
 using namespace System;
 using namespace System::Runtime::InteropServices;
 
 except as a bitmap and the underline is curvy and red.
 
 I don't get any suggestions in this case you show, but when I press space after String^, "String" is replaced with "string", unless I turn off 'Repair case'
 
 James
 |  
                      |  |  | 
              
                | felineWhole Tomato Software
 
      
 
                United Kingdom19247 Posts
 | 
                    
                      |  Posted - Oct 31 2007 :  12:04:10 PM     
 |  
                      | *ah* yes, adding the vector include fixed the code.  Obvious when you point it out  
 I had to change the variables to:
 
 string strLowerCase;
 String ^strUpperCase;
 
 since it does not like a direct "String" instance, but it compiles quite happily.
 
 That suggests that VA has no knowledge of "String".  Simply importing an additional list of symbols should not remove its knowledge of an existing set of symbols *puzzled*
 
 Can you please go to:
 
 VA Options -> About -> Copy Info
 
 and paste the details (from the clipboard) into this thread.  This will give us the basic information about your setup.
 
 As for the using statement, I am seeing this:
 
 
  
 notice no underlining, the namespace is all blue and all italic.
 
 My current guess, some basic difference in how our two systems are configured, but what difference?
 |  
                      | zen is the art of being at one with the two'ness
 |  
                      |  |  | 
              
                | jamesoKetchup Master
 
     
 
                United Kingdom83 Posts
 | 
                    
                      |  Posted - Nov 01 2007 :  04:23:18 AM     
 |  
                      | VA_X.dll file version 10.4.1614.0  built 2007.10.22 Licensed to:
 VA X: [snip](1-user license) Support ends 2008.03.10
 DevEnv.exe version 8.0.50727.762
 msenv.dll version 8.0.50727.762
 Font: Consolas 11(Pixels)
 Comctl32.dll version 6.0.2900.2982
 Windows XP 5.1 Build 2600 Service Pack 2
 2 processors
 
 Platform: Win32
 Stable Includes:
 d:\\TestApp\\Testnamespace;
 C:\\Program Files\\Microsoft Visual Studio 8\\VC\\include;
 C:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\include;
 C:\\Program Files\\Microsoft Visual Studio 8\\VC\\PlatformSDK\\include;
 C:\\Program Files\\Microsoft Visual Studio 8\\SDK\\v2.0\\include;
 ;
 ;
 ;
 
 Library Includes:
 d:\\TestApp\\Testnamespace;
 C:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\src\\mfc;
 C:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\src\\mfcm;
 C:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\src\\atl;
 C:\\Program Files\\Microsoft Visual Studio 8\\VC\\crt\\src;
 
 Other Includes:
 
 
 |  
                      |  |  | 
              
                | jamesoKetchup Master
 
     
 
                United Kingdom83 Posts
 | 
                    
                      |  Posted - Nov 01 2007 :  04:30:34 AM     
 |  
                      | Looking at where VA was getting information about the system namespace in a new solution, it seems that TLH files in %temp% are being parsed by VA, irrespective of whether they are referenced by the solution.  If I delete %temp%\\*.tl? I no longer get any suggestions either for the system namespace, even in a new MC++ project which looks like this:
 
 #include "stdafx.h"
 
 using namespace System;
 
 int main(array<System::String ^> ^args)
 {
 return 0;
 }
 
 I don't think VA should be parsing the TLH unless the import is in the current solution, but this is clearly a seperate problem to the intellisense not working for managed namespaces
 
 
 |  
                      |  |  | 
              
                | felineWhole Tomato Software
 
      
 
                United Kingdom19247 Posts
 | 
                    
                      |  Posted - Nov 01 2007 :  11:35:25 AM     
 |  
                      | I agree, no suggestions in a new project is bad, and this is where we need to start. 
 On my win2k test system, with VA 1614 and VS2005 I did the following:
 Deleted all files that were not in use from %TEMP%, a single zero length .TMP file was left over, which I think we can safely ignore
 Create a new "C++ -> CLR -> CLR Console Application" project on C:
 Check it compiles, it does
 Add a new line in the main function, start typing "String" and suggestions immediately turn up.
 I am not having any case correction problems typing "String^"
 
 My project, with a comment telling you what I did is here:
 
 http://forum.wholetomato.com/colin/forumimages/thread_6884_cpp_clr_console_app.zip
 
 can you download and open this project on your machine please, and see what happens for you?  At least this way we will know we are both starting from the same point.
 |  
                      | zen is the art of being at one with the two'ness
 |  
                      |  |  | 
              
                | jamesoKetchup Master
 
     
 
                United Kingdom83 Posts
 | 
                    
                      |  Posted - Nov 02 2007 :  03:40:02 AM     
 |  
                      | Typing 
 Strin
 
 gives me a suggestion list starting
 
 string
 stringbuf
 StringFromCLSID
 StringFromGUID2
 StringFromIID
 stringstream
 
 but no String.
 
 If I have 'correct case' turned on, "String" changes to "string" when I press ^
 
 Typing
 String^ x;
 x->[ctrl-space]
 
 gives no suggestion list at all.
 
 James
 |  
                      |  |  | 
              
                | felineWhole Tomato Software
 
      
 
                United Kingdom19247 Posts
 | 
                    
                      |  Posted - Nov 02 2007 :  09:13:29 AM     
 |  
                      | Can you turn on: 
 VA Options -> Advanced -> listboxes -> Get content from default Intellisense
 
 and re-try CTRL-SPACE after "x->" please.  On paper this "must" work, but at this stage I am half expecting it to fail.
 |  
                      | zen is the art of being at one with the two'ness
 |  
                      |  |  | 
              
                | jamesoKetchup Master
 
     
 
                United Kingdom83 Posts
 | 
                    
                      |  Posted - Nov 02 2007 :  09:24:12 AM     
 |  
                      | Yes, that works.
 
 (Normally, I have feacp.dll renamed, but moved it back for this test)
 
 James
 |  
                      |  |  | 
              
                | felineWhole Tomato Software
 
      
 
                United Kingdom19247 Posts
 | 
                    
                      |  Posted - Nov 02 2007 :  10:12:11 AM     
 |  
                      | Well that is good news, of a form.  At least something is working. 
 I have just tried the following experiment:
 
 I renamed "feacp.dll" to stop it working.
 I told VA to rebuild its symbol database, and closed the IDE.
 I deleted the NCB file from the root directory of the CLR C++ project I gave you the link to
 
 After loading this test solution, and letting VA do its parsing, I tried typing "String".  This still works correctly for me.
 
 With the code:
 
 
 int main(array<System::String ^> ^args)
{
    Console::WriteLine(L"Hello World");
	// type "String^" on the following line
	String^ x;
	x->|
    return 0;
}
 At this point pressing CTRL-SPACE produces nothing if I have "Get content from default Intellisense" turned on - which makes sense.
 
 Turn this option off and CTRL-SPACE works perfectly.
 
 Back to basics, if you add "String" manually and place the caret into this type what, if anything, does VA show in its context and definition fields?
 How is "String" drawn?  For me it is blue (the colour of types) and italic (I have stable symbols in italics turned on).
 If you show VA View, place keyboard focus into the editor, and hover the mouse over "String" does VA show you anything in the bottom half of VA View?
 |  
                      | zen is the art of being at one with the two'ness
 |  
                      |  |  | 
              
                | jamesoKetchup Master
 
     
 
                United Kingdom83 Posts
 | 
                    
                      |  Posted - Nov 02 2007 :  10:21:39 AM     
 |  
                      | quote:Back to basics, if you add "String" manually and place the caret into this type what, if anything, does VA show in its context and definition fields?
 
 
 'main' and nothing
 
 
 quote:How is "String" drawn? For me it is blue (the colour of types) and italic (I have stable symbols in italics turned on).
 
 
 Black (unknown?) and underlined in blue ( = mistyped symbol)
 In Console::WriteLine, console is black, underlined in blue, WriteLine is brown (=method), underlined in blue.
 
 
 quote:If you show VA View, place keyboard focus into the editor, and hover the mouse over "String" does VA show you anything in the bottom half of VA View?
 
 
 No, nor the top.  "Files in solution" is populated, but "Symbols in Solution" is empty
 
 If I hover over String, I get a tooltip:
 ref class System::String sealed
 Represents text as a series of Unicode characters
 
 It's got a 1px gap between the text and the border - I vaguely remember that that has some significance.  I do get a refactor button when hovering over String, but clicking it says "Refactoring not available on symbol"
 
 James
 
 |  
                      |  |  | 
              
                | felineWhole Tomato Software
 
      
 
                United Kingdom19247 Posts
 | 
                    
                      |  Posted - Nov 02 2007 :  10:55:27 AM     
 |  
                      | Have you tried rebuilding you VA symbol database yet? 
 VA Options -> Performance -> Rebuild symbol databases
 
 To be honest I am out of ideas, and if this does not help I am going to ask our developers about this.  Everything looks reasonable, and sensible, but it is simply not working.
 |  
                      | zen is the art of being at one with the two'ness
 |  
                      |  |  | 
              
                | jamesoKetchup Master
 
     
 
                United Kingdom83 Posts
 | 
                    
                      |  Posted - Nov 02 2007 :  12:12:34 PM     
 |  
                      | I've been rebuilding database before each test!  Sorry :/ 
 James
 |  
                      |  |  | 
              
                | felineWhole Tomato Software
 
      
 
                United Kingdom19247 Posts
 | 
                    
                      |  Posted - Nov 02 2007 :  3:42:17 PM     
 |  
                      | Right, log files and developers time.  Can you please do the following: 
 Close the IDE
 Open the IDE, but do not load any solutions
 Turn on logging, as explained here:  http://docs.wholetomato.com?W305
 Open one of the small CLR C++ projects
 Wait for VA to finish any parsing it wants to do
 Try typing "String^ x;", I am expecting to see "String" replaced with "string" here, which is fine, since it is being logged.
 Close the IDE and send us the log 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.
 
 I am hoping this will help to point our developers in the right direction.
 |  
                      | zen is the art of being at one with the two'ness
 |  
                      |  |  | 
              
                | seanWhole Tomato Software
 
      
 
                USA2817 Posts
 | 
                    
                      |  Posted - Nov 10 2007 :  2:53:28 PM     
 |  
                      | The problems here were opened in case=9805 and case=9736 
 case=9805 is fixed in build 1616
 
 |  
                      |  |  | 
              
                | jamesoKetchup Master
 
     
 
                United Kingdom83 Posts
 | 
                    
                      |  Posted - Nov 12 2007 :  03:35:28 AM     
 |  
                      | I can confirm that what I presume to tbe 9805 appears to be fixed in 1616 (although I was bemused to see that the suggestions include private members of system types such as String.wcslen - is this intended?) 
 Thanks
 
 James
 
 Edit: ')' expected
 |  
                      | Edited by - jameso on Nov 12 2007  05:58:12 AM
 |  
                      |  |  | 
              
                | felineWhole Tomato Software
 
      
 
                United Kingdom19247 Posts
 | 
                    
                      |  Posted - Nov 12 2007 :  08:12:46 AM     
 |  
                      | VA 1561 and VA 1616 both suggest "String.wcslen" for me. 
 As a general rule VA will list all members (public, protected and private) since it does not know which items you actually have access to, and which ones you do not have access to.
 
 This is where the icons on the items come in useful (they show the access level, among other things) along with the filtering toolbar.
 |  
                      | zen is the art of being at one with the two'ness
 |  
                      |  |  | 
              
                |  |  Topic  |  |