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
 VAX: inserting brackets after function
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Uniwares
Tomato Guru

Portugal
2321 Posts

Posted - Apr 29 2004 :  1:13:45 PM  Show Profile
When editing existing code, it may happen that I insert a function in front of existing code, like in this sample:
// before
int ID = somevalue;

// inserting now
int ID = Convert.somevalue;

The red "Convert." is what I'm inserting, thus after the dot, the completion box pops up and I select "ToInt32". VAX (or is it VS?) inserts the ToInt32 and brackets.
Now we have:
int ID = Convert.ToInt32(|)somevalue;

The caret it between the brackets. But I want to have "somevalue" between the brackets. When I press delete, VAX will delete BOTH brackets instead of only the closing bracket.
So I have the choice of pressing Del, inserting a opening bracket manually, press end and left and insert a closing bracket. Or I press space, del, backspace, end, left and insert a closign bracket. Or, you get the point.
Whatever I do, the inserted brackets make me have more work instead of less.

I know this has been discussed in another thread, some time ago, with no result. But this is really one of the annoying things, because you MUST type more than without VAX.


This brings up another bug which has been reported already: Using the scroll thumb in the completion list. While using the scrollbar in the suggestion/completion list under VS.NET works fine, it does not under VS6. After you release the scroll thumb the list disappers. Another annoyance.

Stephen
Tomato Guru

United Kingdom
781 Posts

Posted - Apr 29 2004 :  1:25:33 PM  Show Profile
But you might have wanted (something like)
int ID = Convert.ToBlah(foo).somevalue
and VA would have been correct. What are you suggesting? That VA should never insert brackets at all in the middle of the line?

Stephen Turner
ClickTracks http://www.clicktracks.com/
Winner: ClickZ's Best Web Analytics Tool 2003 & 2004
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2321 Posts

Posted - Apr 29 2004 :  1:59:49 PM  Show Profile
Only when the character AFTER the inserted function is "a character not valid in a symbol". Thus, if you have a space, dot, hyphen, whatever, the brackets may be inserted. If its a alphanummeric character it may not.

As for your sample, it is still easier (less keystrokes) to press "(" to have it insert brackets, than to remove half of the automatic brackets.


I "think" this will improve usability.
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Apr 29 2004 :  7:50:24 PM  Show Profile
We see one problem, at least one that is obvious. Delete should remove one paren, ie the closing paren, not both. Removing one paren is what happens with VS.NET, not with VC++ 6.0. We must have busted something recently.

If this worked, you could press Del and move to add the closing paren.

ixBug=6

As for the problem with the scroll thumb, we continue the discussion in its own thread:

http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=1572

Whole Tomato Software, Inc.
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2321 Posts

Posted - Apr 29 2004 :  9:38:57 PM  Show Profile
Support, I'm currently using VS2003.NET + C#. Same thing there. Really busted.

But, I also thought that this was a feature of VAX that one can remove BOTH auto inserted brackets with a single del and backspace...
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2321 Posts

Posted - Apr 30 2004 :  09:24:11 AM  Show Profile
Strangely enough, your described method (DEL deletes only closing bracket) sometimes even works. Didnt find a pattern yet.
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Apr 30 2004 :  5:50:05 PM  Show Profile
Getting DEL to delete both parens if fairly easy for us in VC++ 6.0. We open a project. Find a source file and method that defines a local CRect. Type rect.copyr<tab> and press DEL. Both parens disappear.

Whole Tomato Software, Inc.
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2321 Posts

Posted - Apr 30 2004 :  7:35:59 PM  Show Profile
Yeah, I know. What I meant was that SOMETIMES deleting only one works as you described it (in vS.NET) but not always. Most of the times it deletes both brackets.
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - May 03 2004 :  07:14:55 AM  Show Profile
We fix Uniwares's problem and change the behavior of Undo, BS and DEL slightly in build 1234. We think the changes make sense.

After auto-insert of (), whether caret is between or after parens, Undo and BS remove both parens. DEL removes just the right paren.

Whole Tomato Software, Inc.

Edited by - support on May 03 2004 1:50:36 PM
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2321 Posts

Posted - May 03 2004 :  3:25:02 PM  Show Profile
That sounds good and intuitive.
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - May 08 2004 :  3:55:32 PM  Show Profile
DEL fixed in build 1234. DEL removes only the closing parenthesis of auto-inserted ()'s.

Backspace removes both ()'s in VC++ 6.0 but only one in VS.NET. We expect to resolve the inconsistency in build 1236.

Whole Tomato Software, Inc.
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - May 12 2004 :  3:11:17 PM  Show Profile
Resolving the inconsistency between IDEs turns out to be a ridiculously large amount of work. The problem is related to management of undo buffers.

Type foo() in VS.NET, without VA X, and Undo gets rid of foo(). Try the same in VC++ 6.0 and only () is removed. Ugh.

We leave this inconsistency for a very rainy day.

Whole Tomato Software, Inc.
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2321 Posts

Posted - May 12 2004 :  3:29:25 PM  Show Profile
Uhh, I see bad weather coming up...
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000