Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 replacing selected opening parenthesis

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
LiquidEyes Posted - Apr 03 2006 : 7:59:28 PM
system info:
Visual Assist X: version 10.2.1444.0, built 2006.03.12
Microsoft Visual C++ .NET, English, version 7.1.3088

bug details:
this works:
1. Find a function call with at least one argument.
2. Select the opening parenthesis.
3. Type ( [left parenthesis]. The selected parenthesis is replaced, and the function info pops up as expected. All good so far.

this doesn't work:
4. Now find a function call with no arguments. Select the opening parenthesis.
5. Type ( as before. Now we get an extra closing parenthesis!

illustration:



I am in the habit of doing this from before I installed Visual Assist X. However as you can see, since I installed Visual Assist X the behaviour has now changed for functions without arguments.

Is this a known bug?

Best wishes,
Andy
7   L A T E S T    R E P L I E S    (Newest First)
LiquidEyes Posted - Apr 04 2006 : 2:10:50 PM
I do totally see it from your point of view.

I am sure that it is 'correct' behaviour from one perspective (i.e. in the context of the 'bracket correction' feature and its intended scope). Nevertheless it would be nice if you can make it smarter!

Cheers for listening.
rhummer Posted - Apr 04 2006 : 10:45:34 AM
While I agree with your example that it should not insert a ')' since that is *technically* incorrect. It is possible to argue that VAX is handling it correctly, selecting 9 and hitting '(' inserts the ')'.

But I will see if there might be anyway to make VAX abit smarter in this situation. Atleast make it so that selecting a single '(' and just replacing it with another '(' doesn't insert the ')'

case=1116
LiquidEyes Posted - Apr 04 2006 : 07:04:03 AM
I do take your point Rhummer -- I can imagine what's going on internally -- but it is an inconsistency, both:

1. between the way Visual Studio worked prior to and after installing VAX; and
2. between the way VAX behaves when replacing the opening parentheses of funcWithOneParameter and funcWithNoParameters respectively.

I do concede that I may have been exploiting an 'oddity' of the MS IDE, since formerly that seemed to be the only way to make the function info reappear; nevertheless I think an argument could be made that there is a fundamental difference between inserting a new parenthesis and replacing a character with a parenthesis, and hence that it should not try to 'correct' in the latter case when there is already a closing parenthesis in place.

I suspect VAX already has the 'intelligence' to discern this case, since it appears to know not to add an extra closing parenthesis to funcWithOneParameter when replacing the opening parenthesis.

Moreover, this is a deeply ingrained habit of mine!

One final example: imagine I accidentally entered funcWithNoParameters 9); (quite plausible). If I then highlight the 9 and replace it in the same way, I get the same problem (an extra closing parenthesis is produced).

Interestingly however, if I select both the 9 and the ) and replace with a ( no auto-correction occurs. Intuitively this seems the wrong way round!

Mr Support: as you suggest, I shall try to break my habit and use Ctrl-Space instead. Do you take my point though?
support Posted - Apr 03 2006 : 11:25:34 PM
We assume your trick is a way to force parameter info to appear. This one is new to use.

You can also place your text caret anywhere within the arg list and press Ctrl+Space.
rhummer Posted - Apr 03 2006 : 9:27:31 PM
Well highlighting text and pressing '(' would imply that you want the selection to be surrounded with parenthesis. and Just typing '(' with nothing highlighted would suggest you just want a '('.

So technically with the steps you describe VAX is correct with inserting an extra ')'.

I haven't noticed any incosistancies, what in specific to you is inconsistent?
LiquidEyes Posted - Apr 03 2006 : 9:13:14 PM
I don't really want to disable the option though. It is useful when it gets it right!

If there's already a closing parenthesis there, it's not really a 'correction' to add an extra one.

Further, looking at it another way, isn't it inconsistent that you sometimes get the closing parenthesis added, but sometimes you don't?
rhummer Posted - Apr 03 2006 : 8:40:59 PM
Uncheck "Insert () and closing }])'" in the Text Editor -> Correction in The VAX options. and VAX will nolonger insert an extra closing parenthesis

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