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
 Technical Support
 replacing selected opening parenthesis
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

LiquidEyes
New Member

7 Posts

Posted - Apr 03 2006 :  7:59:28 PM  Show Profile  Reply with Quote
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

rhummer
Tomato Guru

USA
527 Posts

Posted - Apr 03 2006 :  8:40:59 PM  Show Profile  Reply with Quote
Uncheck "Insert () and closing }])'" in the Text Editor -> Correction in The VAX options. and VAX will nolonger insert an extra closing parenthesis

Tools Engineer - Raven Software
VS2005 SP2/VS2008 SP1 - VAX <LATEST> - Win 7 x64

Go to Top of Page

LiquidEyes
New Member

7 Posts

Posted - Apr 03 2006 :  9:13:14 PM  Show Profile  Reply with Quote
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?
Go to Top of Page

rhummer
Tomato Guru

USA
527 Posts

Posted - Apr 03 2006 :  9:27:31 PM  Show Profile  Reply with Quote
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?

Tools Engineer - Raven Software
VS2005 SP2/VS2008 SP1 - VAX <LATEST> - Win 7 x64

Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Apr 03 2006 :  11:25:34 PM  Show Profile  Reply with Quote
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.
Go to Top of Page

LiquidEyes
New Member

7 Posts

Posted - Apr 04 2006 :  07:04:03 AM  Show Profile  Reply with Quote
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?
Go to Top of Page

rhummer
Tomato Guru

USA
527 Posts

Posted - Apr 04 2006 :  10:45:34 AM  Show Profile  Reply with Quote
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

Tools Engineer - Raven Software
VS2005 SP2/VS2008 SP1 - VAX <LATEST> - Win 7 x64

Go to Top of Page

LiquidEyes
New Member

7 Posts

Posted - Apr 04 2006 :  2:10:50 PM  Show Profile  Reply with Quote
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.
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