Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 case behaviour in c++

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
streamer Posted - May 18 2012 : 11:38:37 AM
writing switch/case in c++ in VS2010 Win7x64

After writing a case command there are two options available in pop-up: normal case and defined suggestion for type.

Selecting defined suggestion for type (popup shows text: accept with <TAB> or <Enter>) with TAB or Enter doesn't show list with available types.

However, pressing space shows desired behavior and lists available types. And this is ok, because when someone types fast it is activated on space.

Listing of types shouldn't be available also on pressing space or TAB according to popup text displayed?

regards



3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - May 21 2012 : 3:56:10 PM
When you are accepting "case" are you getting "case" or "case " with a trailing space? I think I see what you are saying now. If you have just accepted "case" with no trailing space, then you need to type the space before VA knows you are looking to place something after the keyword "case", and are not typing a longer symbol that just happens to start with the letters "case".
streamer Posted - May 21 2012 : 12:43:36 PM
Maybe I did not stated myself clearly.

Popup is working fine. Pressing space is also working fine.

Let me show you how to produce this bug/behavior:
Write cas, then popup shows with two types of case commands. There is a text "accept with <TAB> or <Enter>." Pressing TAB or ENTER selects and completes writing of case command, but there is no suggestion list for parameter of the case command (in example above, there should be FELINE_ONE, FELINE_TWO, FELINE_THREE )

Is this intended type of behavior?
feline Posted - May 21 2012 : 11:39:11 AM
I don't understand. Using C++ I have added this test enum to a header file:

enum FelineTestEnumCase { FELINE_ONE, FELINE_TWO, FELINE_THREE };


and this code to the matching cpp file:

static void testGeneralCode()
{
	FelineTestEnumCase enumVar = FELINE_ONE;
	switch(enumVar)
	{
		ca|
	}
}

With the caret where the red line is, I am getting a listbox suggesting "case", since this is what I am currently typing. When I type a space after "case" I get a suggestion list from VA, offering me the enum items, which come from VA's Smart Suggestions:

http://www.wholetomato.com/products/features/smartSuggestions.asp

until you have typed "case " we don't know you are doing this. You might be typing a "default:" line, or something different again.

Are you seeing the same thing? Given this code example, what are you typing, and what are you expecting to see, to have happen?

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