Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Enum completion

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
znakeeye Posted - Aug 15 2008 : 09:17:49 AM
I believe this feature would yield another "WOW" experience, and I have a feeling it might be quite easy to implement.
I hope you like the idea as much as I do :)

In C++ you often use enum types. Consider this example:
enum PeriodType
{
    periodAlways,
    periodLastWeek,
    periodPastMonth,
    periodPastYear,
    periodSpecifyDates
};

void SetPeriod(PeriodType periodType);
void SetPeriodEx(PeriodType periodType, bool update);
It would be nice if VAX could show a list of available constants (similar to the variable completion), when declaring a function call:

SetPeriod(|
SetPeriodEx(|, false)

...or initiating a variable:
PeriodType p = |
PeriodType p2(|
p2 = |

...or in a class initialization:
CMyClass::CMyClass()
: m_periodType(|

Taking care of all relevant operators, such as "+", "OR" and "AND", is also desirable:
p2 = p | |
p2 = p | (periodMask & |)
p2 &= ~|;

Basically, whereever the enum type is expected you would show a list of available constants!

Also, <Ctrl+Space> should explicitly show this list (in case you press <Esc>).
3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Aug 16 2008 : 08:51:08 AM
So CTRL-SPACE no longer lists the variables and functions? Surely that is going to cause more problems than it fixes.
znakeeye Posted - Aug 15 2008 : 4:24:16 PM
Ok, here's my backup approach:

Show this list when you press <ctrl+space> at a valid place.
feline Posted - Aug 15 2008 : 10:30:40 AM
The idea is interesting, but there are two problems here.

Firstly the assignment statements. You are assuming that the programmer wants to assign the variable to an enum item. But why not assign the variable to another variable, the return type of a function, a constant, or something else?

Having a listbox appear that only lists the enum members is going to get in the way.

The same effect applies to calling a function, but there is a further complication. When dealing with overloaded functions VA is not going to know which overload you are calling, so it will not know what type the parameters are.

This is where suggestions should help, since if you have recently used one of the enum members VA should be offering it as you start typing its name.

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