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
 1624 "this" is unknown?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Uniwares
Tomato Guru

Portugal
2320 Posts

Posted - Jan 16 2008 :  12:36:01 PM  Show Profile  Reply with Quote
Well, not much to say about it, in my unmanaged C++ projects all occurrences of "this" are marked unknown (red wavy underline) and . to -> expansion doesnt work either, naturally functions following this-> are marked as unknown too.

Reparsing, etc., shows no effects. Its not a new thing in 1624, it just bugged me enough now.

Irritating.

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Jan 16 2008 :  1:22:10 PM  Show Profile  Reply with Quote
Can you try copy / pasting this simple test case into one of your header files please:

class testUsingThisForFeline
{
private:
	int m_nHeightFeline;
	int m_nWidthFeline;

public:
	int calcluateFelineArea()
	{
		return this->m_nHeightFeline * this->m_nWidthFeline;
	}
};

How does VA handle "this" in this code? This sample works correctly for me. The names are designed to be unique in your code, so we don't have to worry about any confusion over what symbol is what.

We are hoping to post the next build in the next few days, and there is some hope it will help some of the parser problems you are seeing. I really hope it does.

zen is the art of being at one with the two'ness

Edited by - feline on Jan 16 2008 1:22:38 PM
Go to Top of Page

eve
Tomato Guru

Belgium
101 Posts

Posted - Jan 22 2008 :  02:12:05 AM  Show Profile  Reply with Quote
If you are using 'using namespace' statements, then VAX will not recognize the 'this' keyword.
I logged this before quite some time ago: (http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=5549)

regards,
eli
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Jan 22 2008 :  09:15:26 AM  Show Profile  Reply with Quote
Found it, thank you for the link. The underlining part of the problem became:

case=4135

Uniwares my test case for this bug used this code in the header file:

namespace BUG_ALT_G_SPACE
{
    class bugAltGUsing
    {
        int m_n;
        void functionUsingThis();
    };
};

and the following code to the matching cpp file:

using namespace BUG_ALT_G_SPACE;

void bugAltGUsing::functionUsingThis()
{
    // both "this" and "m_n" are underlined as mistyped symbols
    this->m_n = 0;
}


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

barto
Junior Member

Germany
19 Posts

Posted - Jan 22 2008 :  10:35:42 AM  Show Profile  Reply with Quote
Hi, I'm not sure if the bug I encountered is the same as this one...

I have code like this (distributed across several source files)

class CNode {
  ... /* doesn't have "int id" */
};

namespace w3d {
  class CNode {
    int id;
  };
}

using namespace w3d;

bool CCedDoc::ExportLevelWii()
{
   w3d::CNode* node;
   node->id.... // VAX intellisense works correctly here

   CNode* node2;
   node2->id.... // VAX thinks node2 is of type ::CNode and not w3d::CNode
}

I guess there's a problem with the "using namespace" declaration not being properly recognized by VAX?!

Edited by - barto on Jan 22 2008 10:36:09 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Jan 22 2008 :  2:24:30 PM  Show Profile  Reply with Quote
barto in your case if you use alt-g on the two "CNode" types where does VA take you? I am seeing a similar problem here, but because my test code is not properly configured it does not compile, so my test may not be showing the same problem you are experiencing.

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

schoenherr
Tomato Guru

Germany
160 Posts

Posted - Jan 23 2008 :  01:00:00 AM  Show Profile  Reply with Quote
i believe that in some other threads the fact is mentioned that VAX for duplicate symbols as CNode VAX chooses the first occurrence. So node is handled correctly because it uses the namespace explicit. node2 uses the toplevel definition of CNode because this appeares first. from memory i think they talked about situations like:
"VAX is designed to work with incorrect code, which is to 90% case while editing".
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Jan 23 2008 :  08:49:43 AM  Show Profile  Reply with Quote
My initial "quick and dirty" test for this fails to compile, since the compiler points out that it does not know which class the second CNode actually represents. Both class definitions are visible at that point.

Thinking about edge cases, it is easy to dream up cases where VA stands very little chance of getting this right. Anything that uses #if #elif to work out which class declaration is visible, and so is used, is likely to cause problems.

Most code should not look like that though.

If alt-g knows which class you are using for the second CNode then it is reasonable to expect VA to show the correct listbox. However if alt-g is also confused then we have a "bigger" problem.

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

sean
Whole Tomato Software

USA
2817 Posts

Posted - Feb 02 2016 :  7:54:11 PM  Show Profile  Reply with Quote
case=4135 is fixed in build 2089.
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2320 Posts

Posted - Apr 04 2019 :  6:44:13 PM  Show Profile  Reply with Quote
Damn guys, it took you 8 years to fix this bug, and me 3 years to see the fix, hahahahahaha. Am back to programming, watch out.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Apr 05 2019 :  06:07:05 AM  Show Profile  Reply with Quote
If we show no fear, maybe he will go easy on us this time round

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

Uniwares
Tomato Guru

Portugal
2320 Posts

Posted - Apr 05 2019 :  07:52:53 AM  Show Profile  Reply with Quote
Dont worry, been off the grid for 9 years, will take a while to get back to full throttle. ;)
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