Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Bug: incorrect auto-insert text for function parms

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
bressler Posted - Jul 20 2006 : 5:08:25 PM
Versions
VA Assist X 10.2.1446.0
Visual Studio 2005 Team Ed for S/W Archs, us-en, 8.0.50727.42

Summary
The suggested auto-insert text for a C++ function parameter list is wrong if the function includes stack objects as default parameters.

Example
Here's the function declaration in the .h file:

class Path
{
   ...
   void addZoomSegment(double s, double e, const Ease& easeIn = Ease(), const Ease& easeOut = Ease());
   ...
};
Ease is an object. The easeIn and easeOut parameters use default-constructor instances of the Ease object as their default vaules.

When you type the following into the .cpp file:

void Path::addZoomSegment(
the suggestion in the tooltip is:

double s, double e, const Ease& easeIn /* = Ease */
And if this suggestion is accepted exactly that code is inserted.

Observed
The "()" after the Ease initializer are missing. and the easeOut parameter is left out completely. Other subsequent parameters, if they existed, would also be missing.

Expected
The expected suggestion would be the following:

double s, double e, const Ease& easeIn /* = Ease() */, const Ease& easeOut /* = Ease() */
Probable Cause
The code that tries to collect the rest of the parameters probably got confused by the "()" after the first Ease object. But I'll leave it you guys to figure out what's really wrong :-)

Thanks,
Bryan
Microsoft, Inc.
VA user since VS6

--------------------
VA_X.dll file version 10.2.1446.0 built 2006.05.31
Licensed to:
VA X: [email protected] (1-user license) Support ends 2006.06.27 (eek!)
VA.NET 7.1: [email protected] (1-user license)
VAOpsWin.dll version 1.3.2.4
VATE.dll version 1.0.4.14
DevEnv.exe version 8.0.50727.42
msenv.dll version 8.0.50727.42
Font: ProFontWindows 11(Pixels)
Comctl32.dll version 6.0.2900.2180
WindowsNT 5.1 Build 2600 Service Pack 2
4 processors
Platform: Win32
4   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Sep 26 2013 : 5:25:18 PM
Unfortunately this bug took longer to fix than we would have liked, but we have quite a lot of feature requests and bug reports, and working out where to focus is always a balancing act.

I am glad you still use VA and find it a helpful tool
bressler Posted - Sep 25 2013 : 5:41:38 PM
quote:
Originally posted by support

case=1771 is fixed in build 2001.



Wow! You fixed a bug I reported in 2006! I'm impressed.

Fortunately for me, I'm no longer primarily coding C++/Win32 anymore. But I still use VA nearly every day and I do appreciate that you fixed this bug.

Cheers!
support Posted - Sep 25 2013 : 4:36:16 PM
case=1771 is fixed in build 2001.
feline Posted - Jul 22 2006 : 5:01:21 PM
interesting. using the current beta 1530 if i use the refactoring Create Implementation then i do not have this problem, but if i manually type the function body (look of horror ) then i see this problem.

case=1771

if you are prepared to try the beta, you can use Create Implementation to avoid this.

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