Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 '.' improvement

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 - Jan 17 2008 : 10:19:19 AM
I have this text (cursor at end):
AfxGetApp|

If I type '.' the most reasonable is to insert "()->". That is, the parentheses should be inserted automatically. The same goes for ';' when there are no (or only default) parameters:
myString.Trim|

';' should generate "();"

Motivation
I use backspace quite frequently. That often means I unintentially (or sometimes intentionally) delete the parentheses. Similarly, I often copy function names and then have to add the parentheses manually.
4   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Jan 19 2008 : 2:34:22 PM
quote:
Originally posted by znakeeye

It doesn't matter if a local variable called AfxGetApp is about to be declared -- there will never be a subsequent dot.


I don't follow this. Why not? Create a variable of a complex type, and you use dot to access its members.

I see the appeal of having VA insert brackets, but I am concerned that it might cause problems. How accurate is this going to be?
znakeeye Posted - Jan 19 2008 : 04:59:18 AM
Yes, the brackets are inserted. But if I copy the function name I have to type them manually. I really don't see why the '.' shouldn't complete the parentheses too. It doesn't matter if a local variable called AfxGetApp is about to be declared -- there will never be a subsequent dot.

In Clipboard: AfxGetApp
Ctrl+V '.' should generate:
AfxGetApp()->

The same should happen for GetClientRect(), even though it requires parameters. Motivation: The parentheses should always be there.
feline Posted - Jan 17 2008 : 3:06:33 PM
If you accept a listbox for AfxGetApp or these member functions "Fool" then brackets should have been inserted for you.

If I understand correctly you have deleted the brackets. How is VA to know this was by accident, and not deliberate? You might be about to add a new local variable with this name, so the code without brackets is correct.
znakeeye Posted - Jan 17 2008 : 10:23:28 AM
Hmm, I believe comma (',') should also complete the parentheses:

Fool(a.Fool, b.Fool;
generates:
Fool(a.Fool(), b.Fool());

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