Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Implement Virtual Methods

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
pwc Posted - Mar 18 2011 : 12:54:04 PM
Hi,

I can't get the 'implement virtual methods' command to work with this code:


class IShape
{
public:
    STDMETHOD(GetSize)(int* size)=0;
};

class CShape : public IShape
{
};


Right click 'CShape' and choose the command, you get the dialog listing all the virtual methods and then hit ok.

You will get an error:


---------------------------
Visual Assist X
---------------------------
Visual Assist X failed to modify one or more files. The refactoring may not have completed successfully.
Inspect your files to see if any changes need to be rolled back.

Common causes for this error are read-only files and related source control problems.
---------------------------
OK
---------------------------

It appears to have problems with the STDMETHOD macro.

Thanks,

Paul
5   L A T E S T    R E P L I E S    (Newest First)
feline Posted - May 16 2011 : 3:11:50 PM
For point 1, I have put in a feature request for this:

case=57491

For point 2, you can change the body that VA uses by editing the VA Snippet "Refactor Create From Usage Method Body", and add the return line after or instead of the throw statement.
pwc Posted - May 12 2011 : 5:02:19 PM
It works now, but could stand some improvement. I now get:


class IShape
{
public:
	STDMETHOD(f1)()=0;
};

class CShape : public IShape
{
	virtual STDMETHODIMP f1();
};


Issues/Requests:
1) Can it maintain STDMETHOD() instead of using 'virtual STDMETHODIMP'?
2) Create implementation works, but could you include 'return E_NOTIMPL;' by default? This would allow it to compile.

STDMETHODIMP CShape::f1()
{
	return E_NOTIMPL;
}


Thanks,

Paul
pwc Posted - May 12 2011 : 12:54:36 AM
Yes, I just read the release notes and noticed this was fixed - many thanks. I'll install 1848 and report the results.

Best Regards,

Paul
support Posted - May 12 2011 : 12:45:42 AM
case=56145 is fixed in build 1848
feline Posted - Mar 18 2011 : 7:12:36 PM
I am seeing the same effect here. Thank you for the clear description.

case=56145

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