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
 Function pointers and parenthesis
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

fredizzimo
Junior Member

Finland
11 Posts

Posted - May 17 2009 :  06:00:16 AM  Show Profile  Reply with Quote
In addition to the things in the "Positive confirmation only" topic, this is my other major annoyance with visual assist, and it also destroys my programming flow. This is also a very old case, case=7802, nearly two years old.

I encounter this almost daily, as our mock object library works like this. I type Expect().Once().On(object).Function(&Class:Function).With(5). Everything works fine it flows nicely, I added some simlpler macros so visual assist doesn't get confused. But once I come to the function part it all breaks down, I most likely type &Class:F and press tab. It expands to &Class:Function(), and puts my cursor between the parenthesis, since its a function taking an int argument. Now to undo this effect I have to press two different keys(arrow+del+del, arrow+backspace+backspace, backspace+del or del+backspace), which is very counter productive.

I don't buy the argument that you sometimes might want to take the adress of the return value. First of all a return value is an rvalue, c++ standard 3.10-Temporaries are rvalues (See also lifetime). Secondly you cannot take an address of an rvalue, c++ standard - 5.3.1/2 The operand of & must be an lvalue. So the code is in fact not valid c++, even if some compilers might accept it.

Secondly what's wrong with the code expanding to &Class:Function at first, then when you press ( it shows the function arguments. All of this according to the positive flow and positive confirmations as I have been talking about.

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - May 18 2009 :  3:24:33 PM  Show Profile  Reply with Quote
case=7802 has been fixed, and the fix should appear in the next or next few builds.
Go to Top of Page

fredizzimo
Junior Member

Finland
11 Posts

Posted - May 18 2009 :  4:09:45 PM  Show Profile  Reply with Quote
Thank you, that's great to hear :)
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Jun 12 2009 :  9:03:33 PM  Show Profile  Reply with Quote
case=7802 is fixed in build 1727
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Aug 22 2009 :  7:17:25 PM  Show Profile  Reply with Quote
There was an additional problem with case=7802 when namespaces were present. This is fixed in build 1731.

Whole Tomato Software, Inc.
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