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
 Document method fails on casting operator
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sl@sh
Tomato Guru

Switzerland
204 Posts

Posted - Jun 20 2007 :  12:30:15 PM  Show Profile  Reply with Quote
I've set the autotext entry for Refactor Document Method to
/**
 * $SymbolName$
 * 
 * @return  $SymbolType$    
 * @param   $MethodArgName$    $MethodArgType$    
 */


Now try 'Document Method' on any of the following:
operator double();

or
operator std::vector<int>();

or
operator std::vector<const double*>();


What I get is some code block that halfway looks like it should, but uses another font and various weird symbols (possibly part of that font). Apart from the fact I didn't even know the font could be changed locally this isn't really the kind of behaviour I expected


VA_X.dll file version 10.3.1557.0 built 2007.05.29
Licensed to:
VA X: [snip] Support ends 2007.09.23
VAOpsWin.dll version 1.3.2.2
VATE.dll version 1.0.5.6
DevEnv.exe version 7.10.3077.0
msenv.dll version 7.10.3077.0
Font: Courier New 13(Pixels)
Comctl32.dll version 5.82.2900.2982
Windows XP 5.1 Build 2600 Service Pack 2
2 processors

Platform: Win32
Stable Includes:
C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\include;
C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\atlmfc\\include;
C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\PlatformSDK\\include\\prerelease;
C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\PlatformSDK\\include;
C:\\Program Files\\Microsoft Visual Studio .NET 2003\\SDK\\v1.1\\include;

Library Includes:
C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\atlmfc\\src\\mfc;
C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\atlmfc\\src\\atl;
C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\crt\\src;

Other Includes:

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Jun 20 2007 :  8:18:27 PM  Show Profile  Reply with Quote
Has it occurred to you that since you are such a valuable customer this was organised just for you, to brighten your day, and to add interest to your coding?

This screen shot shows what I am getting:



I have very occasionally seen something similar to what you describe, but I have seen it when the IDE spontaneously decides to turn a line of code into "random" text, in a totally unreadable font. For me that is a display only problem that spontaneously goes away after a few seconds, and I have seen it happen even without VA installed.


I am seeing two problems here though. First no return type:

case=7208

and secondly the squares, invalid characters that may be triggering the display effect on your machine, in the symbol name:

case=7209

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

sl@sh
Tomato Guru

Switzerland
204 Posts

Posted - Jun 21 2007 :  03:51:59 AM  Show Profile  Reply with Quote
Apart from the font change and the 'squares' replaced by some odd characters your screenshot resembles what I see. There's definitely some invalid characters involved, so I'm not surprised to see differences.

Also note that in the last example 'double' is missing as well - this is what I see as well, but I wasn't sure you would be able to reproduce it.
Go to Top of Page

sl@sh
Tomato Guru

Switzerland
204 Posts

Posted - Jun 21 2007 :  05:50:14 AM  Show Profile  Reply with Quote
Btw., here's another case of 'brightening my day' :

Take this code:
class Foo {
    ~Foo()
    Foo();
};

Then put the cursor on the destructor and try 'Refactor Document Method'.

Ok, as can be seen, the problem arises from the missing ';', but in my case the method in question was a bit longer, so it took me a while to spot the true reason behind this surprising behavior
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Jun 21 2007 :  10:51:54 AM  Show Profile  Reply with Quote
I noted the missing "double*" on the 3rd operator function in case=7209 after spotting that oddity myself.


The missing semi-colon, I have been caught exactly the same way quite a few times myself. When all else fails see if the code compiles. When it fails to compile, and you find the syntax error refactoring normally starts working again.

Also I have learned to look out for missing semi-colons when refactoring is not offered, see it is almost a feature

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

support
Whole Tomato Software

5566 Posts

Posted - Jul 07 2007 :  12:28:08 AM  Show Profile  Reply with Quote
case=7209 is fixed in Build 1559
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Jul 07 2007 :  08:35:03 AM  Show Profile  Reply with Quote
The missing "double*" is not yet fixed and is covered by:

case=7250

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

support
Whole Tomato Software

5566 Posts

Posted - Sep 14 2007 :  02:41:42 AM  Show Profile  Reply with Quote
case=7208 is fixed in Build 1561
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