Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 BUG: switch expansion fails on members

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
Mordachai 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
5   L A T E S T    R E P L I E S    (Newest First)
Mordachai 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. :)
accord 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]
sean 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).
ChrisG 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.
ChrisG Posted - Aug 02 2016 : 4:23:30 PM
I was able to reproduce this issue, entering a bug report now.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000