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
 Clever variable suggestion
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

EugeneKozlov
Senior Member

Russia
39 Posts

Posted - Apr 09 2016 :  05:04:10 AM  Show Profile  Reply with Quote
Hello!

VAX have nice autocomletion feature:
Class* ptr = ...;
Class* ptr2 = <suggests ptr>


What about improving this feature work with pointers and references?
For example
Class* ptr = ...;
Class& ref = ...;
Class value = ...;

Class* ptr2 = <suggests ptr, &ref, &value>;
Class& ref2 = <suggests *ptr, ref, value>;
Class value2 = <suggests *ptr, ref, value>; 


Thank you.

Edited by - EugeneKozlov on Apr 09 2016 07:26:32 AM

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Apr 12 2016 :  2:59:17 PM  Show Profile  Reply with Quote
An interesting point. Are you seeing any suggestions at all, currently, for references and instances? Building on your example, I used the following test code, and the comments indicate the suggestions that I am seeing:

class testFelineSimpleClass
{
};

void testGeneralCode()
{
	testFelineSimpleClass *ptr = new testFelineSimpleClass;
	testFelineSimpleClass &ref;
	testFelineSimpleClass value;
	testFelineSimpleClass *ptr2;	// good suggestions
	testFelineSimpleClass &ref2;	// suggestion lists "ref, value"
	testFelineSimpleClass value2;	// suggestion lists "value"
}


Not as complete as you are thinking, but a solid start.

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

EugeneKozlov
Senior Member

Russia
39 Posts

Posted - Apr 14 2016 :  01:45:14 AM  Show Profile  Reply with Quote
Yes, I am.
I see the same suggestions for ref2 and value2.
However, suggestions for ptr2 are ptr (ok) and value (wtf, it will not compile).
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Apr 15 2016 :  2:50:22 PM  Show Profile  Reply with Quote
Which suggestion are you saying does not compile?

The code, as posted, does not compile, but that is because the references have not been initialized.

Not all suggestions are going to be what you want, it is VA attempting to help.

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

EugeneKozlov
Senior Member

Russia
39 Posts

Posted - Apr 15 2016 :  3:51:56 PM  Show Profile  Reply with Quote
Suggestions for 'ptr2' are 'ptr' and 'value', but value cannot be assigned to pointer, so following this suggestion will generate invalid code.

Edited by - EugeneKozlov on Apr 15 2016 3:52:34 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Apr 22 2016 :  8:51:18 PM  Show Profile  Reply with Quote
This is a good point, I have put in a case for this, since the suggestion should be &value not value in this case:

case=96756

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