Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 1624 "this" is unknown?

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
Uniwares Posted - Jan 16 2008 : 12:36:01 PM
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.
11   L A T E S T    R E P L I E S    (Newest First)
Uniwares Posted - Apr 05 2019 : 07:52:53 AM
Dont worry, been off the grid for 9 years, will take a while to get back to full throttle. ;)
feline Posted - Apr 05 2019 : 06:07:05 AM
If we show no fear, maybe he will go easy on us this time round
Uniwares Posted - Apr 04 2019 : 6:44:13 PM
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.
sean Posted - Feb 02 2016 : 7:54:11 PM
case=4135 is fixed in build 2089.
feline Posted - Jan 23 2008 : 08:49:43 AM
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.
schoenherr Posted - Jan 23 2008 : 01:00:00 AM
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".
feline Posted - Jan 22 2008 : 2:24:30 PM
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.
barto Posted - Jan 22 2008 : 10:35:42 AM
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?!
feline Posted - Jan 22 2008 : 09:15:26 AM
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;
}

eve Posted - Jan 22 2008 : 02:12:05 AM
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
feline Posted - Jan 16 2008 : 1:22:10 PM
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.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000