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
 Feature Requests
 Auto-suggest default arguments first
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

irreversible
Starting Member

1 Posts

Posted - Feb 02 2013 :  12:14:25 AM  Show Profile  Reply with Quote
It'd be nice if VAX silently auto-suggested default argument values specified in function declarations.

Let's take a somewhat radical case, although this really does apply to any argument list. Consider calling a function with four default arguments of which you need to customize only one:

void foo(int a, ENUM_A ThisIsEnumA = ENUM_A_someval, ENUM_B ThisIsEnumB = ENUM_B_someval, ENUM_C ThisIsEnumC = ENUM_C_someval, ENUM_D ThisIsEnumD = ENUM_D_someval);

Only wanting to specify ThisIsEnumD currently requires either typing in values of A, B and C or going through (usually rather) lengthy lists of enum values. VAX can't make an ingeniously educated guess in this case anyway (it seems to auto-suggest values with a matching type from nearby scopes), so it'd be nice it if automagically defaulted to ENUM_A_someval, ENUM_B_someval, ENUM_C_someval and ENUM_D_someval.

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Feb 04 2013 :  8:35:37 PM  Show Profile  Reply with Quote
Is this a common situation? Or do you only want to call with the customised default values occasionally?

Adding a refactoring command to call with default arguments, leaving you to then go back and customise one of the arguments seems like a good solution here. Not quite so automatic, but this won't get in the way when you are calling the function "normally" and not passing all of the arguments.

I have put in a feature request for this new refactoring command, to see what our developers make of it:

case=72189

If a command like this was added you would be able to bind it to a keyboard shortcut, making it quick and easy to trigger when required.

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