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
 case behaviour in c++
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

streamer
New Member

6 Posts

Posted - May 18 2012 :  11:38:37 AM  Show Profile  Reply with Quote
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



feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - May 21 2012 :  11:39:11 AM  Show Profile  Reply with Quote
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?

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

streamer
New Member

6 Posts

Posted - May 21 2012 :  12:43:36 PM  Show Profile  Reply with Quote
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?

Edited by - streamer on May 21 2012 12:44:30 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - May 21 2012 :  3:56:10 PM  Show Profile  Reply with Quote
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".

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