Author |
Topic  |
|
Mordachai
Tomato Guru
    
USA
224 Posts |
Posted - Aug 02 2016 : 2:32:47 PM
|
If I try to use the switch expansion macro on a member, it never works.
If I first do:
auto x = myobj.member; switch (x) ...
then VAX expands the switch to have the enumerations available to x.
But:
switch (myobj.member)
fails to expand every single time. :(
VA_X.dll file version 10.9.2107.0 built 2016.07.15 DevEnv.exe version 12.0.40629.0 Professional msenv.dll version 12.0.40629.0 Comctl32.dll version 6.10.10586.494 Windows 8.1 6.3 Build 9600 4 processors (x86-64, WOW64) Language info: 1252, 0x409
|
Edited by - Mordachai on Aug 02 2016 2:33:24 PM |
|
ChrisG
Whole Tomato Software
    
USA
299 Posts |
Posted - Aug 02 2016 : 4:23:30 PM
|
I was able to reproduce this issue, entering a bug report now. |
 |
|
ChrisG
Whole Tomato Software
    
USA
299 Posts |
Posted - Aug 02 2016 : 4:43:01 PM
|
Mordachai,
thank you for taking the time to write a clear bug report for us!
I have entered the bug as case 99109. |
 |
|
sean
Whole Tomato Software
    
USA
2817 Posts |
Posted - Aug 02 2016 : 4:50:28 PM
|
Though that snippet fails, Add Missing Case Statements does work after the fact (shift+alt+q,m). |
 |
|
accord
Whole Tomato Software
    
United Kingdom
3287 Posts |
Posted - Aug 02 2016 : 5:53:19 PM
|
This is a Visual Studio snippet, and the snippet expansion has its limitations like the one mentioned by the original post.
As Sean mentions, Visual Assist has a refactoring feature called Add Missing Case Statements which can be triggered both on an empty switch or on a switch with members after you add new items to you enum so it is more versatile: https://docs.wholetomato.com/default.asp?W644
You can recognise VA snippets by its tooltip text: VA Snippet [Edit] |
Edited by - accord on Aug 02 2016 5:53:35 PM |
 |
|
Mordachai
Tomato Guru
    
USA
224 Posts |
Posted - Aug 04 2016 : 11:20:28 AM
|
Thank you all! I appreciate the fantastic level of support in this product. Much appreciated. I'll take a look at ALT+SHIFT+Q,M - I wasn't aware of it, and it sounds great too. :) |
 |
|
|
Topic  |
|