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
 this keyword
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

eve
Tomato Guru

Belgium
101 Posts

Posted - Oct 30 2006 :  08:56:38 AM  Show Profile  Reply with Quote
Hi,

I noticed that the keyword 'this' is always underlined like a spelling mistake. Also, when writing this->, auto suggestions do not work and any member call on the this pointer is also underlined like a spelling mistake.
This happens both in the initializer list and in normal member functions.

Do you have any ideas what to do to avoid this?

thanks,
eli

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Oct 30 2006 :  3:41:42 PM  Show Profile  Reply with Quote
My first question would be how do you make this happen. It does not happen for me, I have just double checked using VS2003 and VA 1540

* which IDE are you using?
* which version of VA are you using?
* what programming language are you using?
* can you reproduce this in a different project, or on a different machine?
* do you have any other plugin's installed?
* do you have a localised OS or IDE?
* is there anything "odd" or unusual about your system?

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

eve
Tomato Guru

Belgium
101 Posts

Posted - Oct 31 2006 :  02:39:54 AM  Show Profile  Reply with Quote
We all have the same problem here (more than 20 machines) in all our projects on both Visual C++ 2003 and 2005 (all default English systems). The VAX versions range from 1535 to 1540, but I remember we had the same problem using older builds. We have our own plugin but that is just a link with our sourcesafe and build systems.

I can only reproduce the problem when the .h is separated from the .cpp. Following test class reproduces the problem in my project using VAX 1540, VS2003:

--- test.h ---

#pragma once
#ifndef TEST_H
#define TEST_H

namespace TEST
{

class TestClass
{
public:
TestClass();

size_t justAFunction() const;
};

} // end of namespace

#endif // TEST_H


--- test.cpp ---

#include "test.h"

#include <iostream>

using namespace std;
using namespace TEST;

TestClass::TestClass()
{

}

size_t TestClass::justAFunction() const
{
cout << this << endl;
}
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Oct 31 2006 :  11:35:19 AM  Show Profile  Reply with Quote
I am seeing the same thing, thank you for the clear example. VA is being confused by the "using namespace TEST" line, it does not understand that justAFunction() is really a class member function. For now removing the "using namespace TEST" line and either wrapping the cpp file in the namespace, or applying the namespace to the functions will fix this.

case=971

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

ricardog
Junior Member

Brazil
18 Posts

Posted - Oct 22 2009 :  5:45:48 PM  Show Profile  Reply with Quote
Hello,

I'm bumping this old thread because I think this bug regressed in build 1738. I'm experiencing this exact issue, and the same workarounds suggested by feline can be used to fix it.

Thanks for your attention.

Edited by - ricardog on Oct 22 2009 5:46:26 PM
Go to Top of Page

eve
Tomato Guru

Belgium
101 Posts

Posted - Oct 23 2009 :  01:49:03 AM  Show Profile  Reply with Quote
I don't think this was ever fixed...
Go to Top of Page

ricardog
Junior Member

Brazil
18 Posts

Posted - Oct 25 2009 :  03:11:34 AM  Show Profile  Reply with Quote
Oh well... I hope it's not because it's hard to fix or something like that. The bug is simple but annoying. Maybe a moderator could comment on the issue? Thanks.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Oct 26 2009 :  11:10:17 AM  Show Profile  Reply with Quote
ricardog do you remember which version of VA you were using before upgrading to 1738? The notes on this case read as if it was fixed quite some time ago, but this thread was never updated, it must have been missed.

Using a simple test case, I am seeing the problem in VA 1727, so if this is a regression it is not a very recent one.

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

ricardog
Junior Member

Brazil
18 Posts

Posted - Oct 26 2009 :  12:16:01 PM  Show Profile  Reply with Quote
Actually I'm not sure if it worked before, I've noticed this problem recently and since this thread is quite old I figured that it could be a regression. I've been using the most recent release builds, probably I've just missed the problem until now.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Oct 27 2009 :  10:20:12 PM  Show Profile  Reply with Quote
What problem, exactly, are you seeing? I have just gone over case=971 in several different builds of VA.

There was a bug in the original test code, but having fixed that, the Alt-g part of the problem was fixed in VA 1542, and it is still fixed in VA 1738.

The keyword "this" being underlined as a mistyped symbol is still a problem, and is covered by:

case=4135

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

ricardog
Junior Member

Brazil
18 Posts

Posted - Oct 27 2009 :  10:58:14 PM  Show Profile  Reply with Quote
I'm seeing the "this" being underlined, and when I use -> on the underlined "this", it does not show auto-suggestions, as the OP said.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Oct 28 2009 :  10:17:54 AM  Show Profile  Reply with Quote
This explains my confusion, case=971, which is the one I was looking at, is more about the alt-g part of the problem.

Unfortunately eve is correct, "this" being underlined was never fixed. Since VA does not understand the "this" keyword in these situations you are not going to get any suggestions from VA. Does turning on:

VA Options -> Advanced -> Listboxes -> Get content from default Intellisense

help you at all?

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

ricardog
Junior Member

Brazil
18 Posts

Posted - Oct 28 2009 :  10:40:27 AM  Show Profile  Reply with Quote
Yes, enabling that option fixes the auto suggestions, although the "this" keyword is still underlined.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Oct 28 2009 :  2:11:21 PM  Show Profile  Reply with Quote
This is something Unfortunately the only way to stop the "this" keyword being underlined for now is to turn off:

VA Options -> Advanced -> Underlines -> Underline mistyped symbols using

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

haa
New Member

3 Posts

Posted - Jan 25 2011 :  05:25:33 AM  Show Profile  Reply with Quote
Still seeing the problem on build 1837. Are there any plans of ever fixing this (being underlined)?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Jan 25 2011 :  12:21:17 PM  Show Profile  Reply with Quote
This is down as a high priority bug, but unfortunately I don't currently have an estimate for when it will be fixed. But it is still on the list, and has not been forgotten.

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