Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 1438 coloring
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

bugfix
Tomato Guru

Germany
324 Posts

Posted - Dec 21 2005 :  10:50:55 AM  Show Profile  Reply with Quote
I'm really getting fed up of this:)



Basically one can type everything that's declared as field in managed code and VAX does wrong coloring in pure C++ project.

vs2003, c++, 1438

-bugfix

http://www.mf-sd.de

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Dec 21 2005 :  3:06:49 PM  Show Profile  Reply with Quote
have you changed your colour scheme? normally blue is "classes, structures and typedefs" while purple is "preprocessor macros".

what am i looking at here? i see that you have two different colours, but what are you doing? is this function prototypes in a header file, or at the top of a code file?

using VS2003, VS 1438 and C++ i added the following code to a .h file:

void Pack();
void CharSet();
void cbAlignment();
void Guid();
void cbSizeInstance();


the result is as shown. i still have blue set as classes, while i have set orange to be functions. i do not follow the statement "one can type everything that's declared as field in managed code"

i know something about C# programming, but have yet to do any noticeable programming in managed C++.


zen is the art of being at one with the two'ness
Go to Top of Page

bugfix
Tomato Guru

Germany
324 Posts

Posted - Dec 21 2005 :  3:20:08 PM  Show Profile  Reply with Quote
quote:
Originally posted by feline

have you changed your colour scheme? normally blue is "classes, structures and typedefs" while purple is "preprocessor macros".



Nope, I haven't changed anything. My color scheme is default.

quote:

what am i looking at here? i see that you have two different colours, but what are you doing? is this function prototypes in a header file, or at the top of a code file?



Those are just foo decls to demonstrate a problem w/ coloring caused by refering to managed decls.
After I've encounterd a coloring problem w/ Pack() in a class I've
coded I did a new c++ project, added a cpp file and put those line at the beginning.



http://www.mf-sd.de
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Dec 22 2005 :  1:50:50 PM  Show Profile  Reply with Quote
strange. as you can see from my screen shot i did not immediately reproduce this problem. what type of C++ project did you create? is this managed or normal? is it a console or windows application?

if you place the caret into these function's what information does the VA Wizard bar show? this may give a clue as to the odd coloring you are getting.

zen is the art of being at one with the two'ness
Go to Top of Page

bugfix
Tomato Guru

Germany
324 Posts

Posted - Dec 22 2005 :  2:37:56 PM  Show Profile  Reply with Quote
It's plain empty c++ console project.
Tooltips and other infos are shown correctly by VAX.
If I just put e.g. Pack on and empty line VAX resolves it to some managed stuff.
System.Runtime.InteropServices.StructLayoutAttribute.Pack - Int32 Pack : Int32 Pack

Same goes, like I posted before, for every managed field decl. As you might remember it's not the first time I have and reported this problem:)

-bugfix

http://www.mf-sd.de
Go to Top of Page

bugfix
Tomato Guru

Germany
324 Posts

Posted - Dec 23 2005 :  02:41:25 AM  Show Profile  Reply with Quote
I might have found where that managed crap comes from while trying to figure out a better testcase for TOPIC_ID 4247.
I think it comes from some header/idl in MS Platform SDK.
Windows Server 2003 SP1 Platform SDK - April 2005 Edition, that's the version I'm using.

http://www.mf-sd.de
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Dec 23 2005 :  11:39:21 AM  Show Profile  Reply with Quote
Is the header or sdk in your IDE settings? We assume so and that VA X has copied them to the "stable" list of directories VA X parses and knows always. If so and you don't need the cr_p, you can adjust your IDE settings and/or switch our directories to custom. (We recommend the former whenever possible so our settings remain live -- it's easy to forget to change the VA X settings when you're custom.) More info at:

http://www.wholetomato.com/products/features/directories.html?more=yes
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Jan 02 2006 :  2:48:21 PM  Show Profile  Reply with Quote
On further thought, we believe something in a header defines the purple items as macros. If so, VA gets confused as to which color to use when it sees a use of the macro.

Can you do a find in (all) files for "cbSizeInstance" and see if it is defined as a macro?
Go to Top of Page

bugfix
Tomato Guru

Germany
324 Posts

Posted - Jan 02 2006 :  6:03:35 PM  Show Profile  Reply with Quote
I've searched all directories listed in stable includes and there was no macro definition.
So i played like 30 mins w/ custom include directories in VAX. Now I've only these two dirs:
f:\\program files\\microsoft visual studio .net 2003\\vc7\\include
f:\\program files\\microsoft visual studio .net 2003\\vc7\\atlmfc\\include
and coloring is still borked. I've always cleaned and rebuilt database before my tests.
Things start going wrong when VAX imports %WINDIR%\\Microsoft.NET\\Framework\\v1.1.4322\\mscorlib.dll. When I rename the dll coloring is ok beside some error messages from IDE.

http://www.mf-sd.de
Go to Top of Page

bugfix
Tomato Guru

Germany
324 Posts

Posted - Jan 03 2006 :  01:56:16 AM  Show Profile  Reply with Quote
Ok.. I've tracked it further down to:

Microsoft Visual Studio .NET 2003\\Vc7\\include\\gcroot.h
Microsoft Visual Studio .NET 2003\\Vc7\\include\\vcclr.h

These two files contain "#using <mscorlib.dll>" statement. If I comment it out and rebuild database coloring is ok.

http://www.mf-sd.de
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Jan 03 2006 :  4:46:33 PM  Show Profile  Reply with Quote
thank you for the detailed notes. doing a search of C: on my winXP pro machine i am getting the two files:

C:\\WINDOWS\\Microsoft.NET\\Framework\\v1.1.4322\\mscorlib.dll
version = 1.1.4322.2032

C:\\WINDOWS\\ServicePackFiles\\i386\\mscorlib.dll
version = 1.0.3705.6018

a service pack for .NET version 1 was installed on this machine last night, which may be relevant. i have the same file in the same directory as you, so i am expecting to get the same problem. i have told VA to rebuild its symbol database and clear the cache, and after restarting the IDE i am still not getting any colouring problems with the code:


void Pack();
void CharSet();
void cbAlignment();
void Guid();
void cbSizeInstance();

do you mind checking the version of your

%WINDIR%\\Microsoft.NET\\Framework\\v1.1.4322\\mscorlib.dll

file? i have started downloading the "Windows Server 2003 SP1 Platform SDK" from MSDN and i am hoping i don't actually need a Windows Server 2003 SP1 machine to install it on.

zen is the art of being at one with the two'ness
Go to Top of Page

bugfix
Tomato Guru

Germany
324 Posts

Posted - Jan 04 2006 :  3:07:20 PM  Show Profile  Reply with Quote
D:\\WINDOWS\\Microsoft.NET\\Framework\\v1.1.4322\\mscorlib.dll
1.1.4322.2032

D:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\mscorlib.dll
2.0.50727.42

Did you try putting those lines in a .cpp and not in a .h file?
FWIW: I have disabled "Parse all headers when opening a project" option.

http://www.mf-sd.de
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Jan 04 2006 :  5:18:46 PM  Show Profile  Reply with Quote
i was placing the code into a header file, but i have just tried both a header and a cpp file, and i am getting the correct colouring in both files.

*experiments*

i do not have VS2005 installed on this machine but i have just installed .NET 2 from windows update, rebooted and rebuilt VA's symbol databases.

now when i place the code into a cpp file i get the wrong colouring, but i still get the correct colouring when placing the code into a .h file.

so a combination of the .NET 2 version of mscorlib.dll and using a cpp file is required for this to happen. thank you for your help in pinning down the details, this is rather to subtle to easily reproduce on my main test system.

case=951

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000