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
 BUG: switch expansion fails on members
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Mordachai
Tomato Guru

USA
224 Posts

Posted - Aug 02 2016 :  2:32:47 PM  Show Profile  Reply with Quote
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  Show Profile  Reply with Quote
I was able to reproduce this issue, entering a bug report now.
Go to Top of Page

ChrisG
Whole Tomato Software

USA
299 Posts

Posted - Aug 02 2016 :  4:43:01 PM  Show Profile  Reply with Quote
Mordachai,

thank you for taking the time to write a clear bug report for us!

I have entered the bug as case 99109.
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Aug 02 2016 :  4:50:28 PM  Show Profile  Reply with Quote
Though that snippet fails, Add Missing Case Statements does work after the fact (shift+alt+q,m).
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Aug 02 2016 :  5:53:19 PM  Show Profile  Reply with Quote
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
Go to Top of Page

Mordachai
Tomato Guru

USA
224 Posts

Posted - Aug 04 2016 :  11:20:28 AM  Show Profile  Reply with Quote
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. :)
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