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
 Snippet frequently fails substitution.
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

amoldeshpande
Senior Member

USA
33 Posts

Posted - Aug 12 2020 :  5:34:10 PM  Show Profile  Reply with Quote
I have this snippet:

typedef $BaseClassName$ Super;
public:
$ClassName$() = delete;
$ClassName$(TWeakObjectPtr<class SomObject>c): Super(c){}
virtual const TCHAR* GetName() const override {return TEXT("$ClassName$");}


I usually have to type "typ" and the choice for this snippet shows up.

Frequently (about half the time), it will fail to fill in the BaseClassName and I will just end up with

typedef Super;

Edit: Forgot to mention that if I wait a little while, the snippets fill in correctly, so it looks like some sort of parsing issue. I am including the base class header, of course.
---------------------------------------------------------------------
Microsoft Visual Studio Community 2019
Version 16.7.0

Visual Assist 10.9.2385.3
For more information about Visual Assist, see the Whole Tomato Software website at http://www.WholeTomato.com. Copyright (c)1997-2020 Whole Tomato Software, LLC


Edited by - amoldeshpande on Aug 12 2020 5:35:29 PM

amoldeshpande
Senior Member

USA
33 Posts

Posted - Aug 12 2020 :  5:45:40 PM  Show Profile  Reply with Quote
Email sent to support with logs for the most recent repro.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19025 Posts

Posted - Aug 13 2020 :  10:25:44 AM  Show Profile  Reply with Quote
When you see this problem are you working in a newly created class, or is the class you are working in an existing class?

If this is a newly created class that you have just defined then it is possible VA has not yet parsed enough to know what the base class is.

The other theory to explain this problem is that it is related to the "context" where you are typing the snippet shortcut. For example, if the code is still being written, it is possible that VA is not able to correctly parse it, for example if you have non matching curly braces, which would lead VA to not know the correct scope / context for your current situation.

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

feline
Whole Tomato Software

United Kingdom
19025 Posts

Posted - Aug 13 2020 :  10:26:43 AM  Show Profile  Reply with Quote
I have the log files, thank you for these:

case=142793

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

amoldeshpande
Senior Member

USA
33 Posts

Posted - Aug 13 2020 :  11:33:56 AM  Show Profile  Reply with Quote
it may be a regression in the pre-release version of VA that I'm using, since I could not reproduce it with the released version that I just tried. Something to watch out for, I guess.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19025 Posts

Posted - Aug 17 2020 :  12:52:38 PM  Show Profile  Reply with Quote
I have been trying this snippet, triggered by the shortcut "base", in the same pre-release version of VA as you, and so far I cannot reproduce the problem here.

Do you remember if you only saw this in newly created classes? Or also existing classes, where VA should have no problems knowing the base class to expand?

Since the bug seems to be tied to the version of VA for you, I was expecting to be able to reproduce this by now in my tests.

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

amoldeshpande
Senior Member

USA
33 Posts

Posted - Sep 09 2020 :  12:56:15 PM  Show Profile  Reply with Quote
Sorry for the late reply. It is always in newly created classes as far as I can remember.

You may have to try it with an older computer or with fewer cores (I have an i5 4670K Haswell Quad-Core CPU). You would think 3.4 GHz should be more than enough, but I've found that to not be the case.

Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19025 Posts

Posted - Sep 10 2020 :  06:41:13 AM  Show Profile  Reply with Quote
I do most of my tests in various virtual machines, so not super fast.

When you see this problem, is VA's syntax colouring up to date? What about what is being shown in VA's context and definition fields? If VA has not managed to catch up with the new class yet this would explain where the problem is coming from, but if so, there should be other signs of this.

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