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
 Replace 'auto' by actual type
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Jan
New Member

Germany
2 Posts

Posted - Dec 12 2018 :  4:16:37 PM  Show Profile  Reply with Quote
Often I want to be explicit in code which exact type is being used, but I'd like the IDE to help me figure it out and type it for me. 'auto' does pretty much all of that for me, except that it takes away the explicitness.

It would be perfect if I could just type


auto a = someFunc();


then point at the 'auto' and let Visual Assist replace it by whatever type was deduced, so that I get the actual non-auto C++ code


SomeComplicatedType* a = someFunc();


Cheers,
Jan.

feline
Whole Tomato Software

United Kingdom
18751 Posts

Posted - Dec 12 2018 :  4:51:35 PM  Show Profile  Reply with Quote
We are considering adding a command to do this:

case=79735

For now, if you place the caret into the "auto" keyword or the variable name, and look at the VA Context and Definition fields, which are normally shown at the top of the editor window, and are where the alt-m list is shown coming from, VA will show the actual type it has worked out here. You can then place keyboard focus into the definition field and copy out the type, if you want. Not quite the same, but helpful all the same.

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

Jan
New Member

Germany
2 Posts

Posted - Dec 12 2018 :  4:57:39 PM  Show Profile  Reply with Quote
That's actually already quite useful, I hadn't even noticed that. Thanks!

A proper action would of course allow me to bind this to a shortcut (and make it discoverable from a context menu).
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18751 Posts

Posted - Dec 12 2018 :  5:08:02 PM  Show Profile  Reply with Quote
Yes, the proper action is the feature that we are considering adding. For now this is just a helpful work around.

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