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
 (C++) ToString() implementation not generated
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

amoldeshpande
Junior Member

USA
19 Posts

Posted - Oct 05 2020 :  2:23:37 PM  Show Profile  Reply with Quote
If I have a method named ToString() in my header file, I do not get an option to "Create Implementation" when I right click on the function name.


-versions--

Microsoft Visual Studio Community 2019
Version 16.7.5

Visual Assist 10.9.2382.0
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

feline
Whole Tomato Software

United Kingdom
16947 Posts

Posted - Oct 07 2020 :  07:37:10 AM  Show Profile  Reply with Quote
What is the return type of this function?

Does Create Implementation get offered, and work, on other members of this class?

Can you please copy and paste the following simple test class into your solution, placing the class into a .h file with a matching .cpp file, and see if Create Implementation is offered here for you? It is being offered, and works correctly for me here, so I am wondering if the problem is somehow related to your class or file, rather than the function name its self.

class simpleFelineTestClass
{
private:
	int m_nSimpleHeight;
	int m_nSimpleWidth;
public:
	std::string ToString();
};

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

amoldeshpande
Junior Member

USA
19 Posts

Posted - Oct 09 2020 :  12:06:46 PM  Show Profile  Reply with Quote
Ugh, sorry about not specifying that it's a UE4 project, so the type is FString. Other methods do work fine for generating implmentations.

Edited by - amoldeshpande on Oct 09 2020 12:07:06 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
16947 Posts

Posted - Oct 09 2020 :  2:50:20 PM  Show Profile  Reply with Quote
Which version of UE are you using?

What is the full signature of the ToString function? Does it have a UFUNCTION line, or any other macros attached to it?

If you place the caret into the function name "ToString" and press Alt-G what, if anything, happens? If VA believes that an implementation already exists for this function then it won't offer Create Implementation. In this case Alt-G should take you to what VA believes the implementation to be, if this is why the command is not being offered.

If you try copying this ToString declaration into a different class does this make any difference?

I have tried adding just the simple declaration:

FString ToString();

into a simple class:

UCLASS()
class CPPFIRSTPERSON_API AFelineCharacter : public ACharacter
{
    // ...
};

and Create Implementation is working correctly for me. So I am wondering if macros on the function, the class, or perhaps what is above, or even below the ToString declaration in the class could be a factor here.

They shouldn't be, but something is clearly different between your system and mine, but I am not quite sure where to look.

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

amoldeshpande
Junior Member

USA
19 Posts

Posted - Oct 11 2020 :  1:36:58 PM  Show Profile  Reply with Quote
I'm using 4.24. I'll keep an eye on this bug and repost with more information if it happens again.

There were no preexisting implementations or macros. It just stopped working.

I mis-stated a bit when I said right-clicking to Create Implementation. I usually hover over the function name to get the annoying menu that fights with Visual Studio's matching feature (The VS menu is the one with the brush). I prefer VaX's way of taking me to the cpp instead of the peek way in VS, but I wish there was a way to turn the VS version off.

Anyway, like I said, I will post with more info if it recurs.
thanks.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
16947 Posts

Posted - Oct 12 2020 :  05:08:10 AM  Show Profile  Reply with Quote
Have you had a look in the IDE settings? There are a lot of settings, so you may well be able to turn off the IDE feature that is getting in the way.

Another approach is to map the middle mouse button to VA's context menu:

https://support.wholetomato.com/default.asp?W643

For this bug, does this mean it seems a bit random?

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:
© 2019 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000