Author |
Topic |
|
ubersu
Junior Member
16 Posts |
Posted - Oct 19 2004 : 4:45:41 PM
|
I'm a little puzzled by the parsing behavior of VAX when using VS2003 and the .NET languages. When using managed C++, only the System, System.IO, and System.Runtime dll imports get parsed so that their included classes are properly colored in the code. C# does a better job of parsing the imports, but VA View is woefully confused and has no sense of the namespace of even fully quaified methods or classes - in spite of the tooltips that indicate that VAX knows precisely what namespace a construct occupies. This behavior has been consistant in all versions of VAX, including the latest public release.
DJ |
|
Chris Nahr
Ketchup Master
92 Posts |
Posted - Oct 20 2004 : 04:30:03 AM
|
What part of VAX is affected by this? There's another thread about the Definition Field's failure to find correct methods for CLR types with C#, but otherwise all referenced assemblies appear to be imported and parsed correctly by VAX in my C# projects. |
|
|
ubersu
Junior Member
16 Posts |
Posted - Oct 20 2004 : 5:49:51 PM
|
In C#, I have an imported C# dll which contains a number of classes - the tooltips indicate that these are in the correct namespace. One class is named 'SNLXml.Command' - VA View shows the SQLCommand class from System.Data.SQLClient. In managed C++, I use the System::Runtime::InteropServices classes: 'Runtime' is not correctly colored. I also import the System.XML dll. XML is incorrectly colored in the 'using' clause. Further, while tooltips know what class is under the cursor, VA View hasn't got a clue as to the contained classes, and syntax coloring is incorrect... No big thing, but a real puzzle.
DJ |
|
|
feline
Whole Tomato Software
United Kingdom
19014 Posts |
Posted - Oct 22 2004 : 5:17:43 PM
|
could you post a small example function that reproduces this? i dont have any experience with managed C++, so it could take me a while to reproduce this myself. |
zen is the art of being at one with the two'ness |
|
|
ubersu
Junior Member
16 Posts |
Posted - Oct 23 2004 : 3:13:04 PM
|
Well, I'll try...
In a managed C++ console project, get a reference to System.Xml.dll and System.Runtime.InteropServices (mscorlib.dll) then:
using namespace System; using namespace System::Text; using namespace System::IO; using namespace System::Xml; using namespace System::Runtime::InteropServices;
note that 'Text', 'Xml' and 'Runtime' are not colored as classes, but rather as local variables. These declarations precede the 'main' routine.
In 'main', try String* Filepath = "c:\\\\whateverpath\\\\myfile.xml"; StreamReader* sr = new StreamReader(FilePath); String* myString = sr->ReadToEnd(); Console::WriteLine(myString); StringReader* strsr = new StringReader(myString); XmlTextReader* xr = new XmlTextReader(strsr); //whatever code
and note that 'XmlTextReader*' is colored as a local variable, but 'XmlTextReader(strsr)' is colored as a method...
Hope this helps you get an idea. The original code makes reference to some things that are not publishable here, so I've just pulled out this little block.
DJ |
|
|
feline
Whole Tomato Software
United Kingdom
19014 Posts |
Posted - Oct 23 2004 : 3:34:30 PM
|
the colouring on the namespace lines has been added:
case=397
the strange colouring on the: XmlTextReader* xr = new XmlTextReader(strsr);
line is a known issue. i get the same thing in standard C++ all the time. from memory support said that VAX's lightweight parser isn't clever enough to tell that the second XmlTextReader isn't a function call. i will ask support about this one to be sure. |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|