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
 Feature Requests
 Smart hiding of member suggestions
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Shambler
Senior Member

48 Posts

Posted - Feb 07 2017 :  10:28:07 AM  Show Profile  Reply with Quote
When you type 'A->', the member suggestion box pops up after you type '->', but I have a class which declares the '->' operator as private:
private:
	MyClass* operator ->()
	{
		return nullptr;
	}


I would like VAX to detect when that operator is marked as private, and to not show the suggestion box.

The reason I want this, is because I implement alternative syntax with the ->* operator:

	MyClass& operator ->*(const ANSICHAR* PropertyName)
	{
		...
	}


So, as an alternative syntax, I will be typing:
A->*"Member"->*"Member2"

The suggestion box popping up everytime I type '->' really messes with the flow of this syntax though.

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Feb 07 2017 :  11:26:26 AM  Show Profile  Reply with Quote
Do I even want to ask why you are doing this? It seems a very confusing syntax to use.

Do you have:

VA Options -> Enhanced Listboxes -> Source of C/C++ content:

set to VA or the IDE? If this is set to VA, does changing this to the IDE have any effect?

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

Shambler
Senior Member

48 Posts

Posted - Feb 07 2017 :  11:54:47 AM  Show Profile  Reply with Quote
I am doing this so that I can implement reflection, so that members can be accessed by a string instead of directly, but using a syntax that is close to C++.

I can't override the '->' operator to make it work with strings, but I can do this with the '->*' operator, which is the closest I can come to C++ style syntax.

So instead of the normal: A.Member.MemberTwo with compile-time checks on members, if using reflection it becomes A->*"Member"->*"MemberTwo" with runtime checks on members.

I've tried both VA and IDE, and they both display the suggestion box after typing '->'.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Feb 07 2017 :  2:13:54 PM  Show Profile  Reply with Quote
I wondered if using the IDE intellisense would help, since sometimes the IDE intellisense parser is able to work out which members are currently visible, so filters out the invisible ones. But I suspect no one has really considered this particular situation, I know I had not.

So far the closest I can come to a solution is turning off both:

VA Options -> Suggestions -> Enable in C++
IDE tools menu -> Options -> Text Editor -> C/C++ -> Auto list members

which stops the listbox when you type ->, but this will stop it for all classes, not just the ones where you have hidden the -> operator. With these settings, you can then press CTRL-SPACE to bring up the listbox after the -> if you happen to want it.

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