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
 1230: Typing of multiple :: inserts parantheses
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

.oisyn
Tomato Guru

162 Posts

Posted - Apr 25 2004 :  7:43:12 PM  Show Profile
Usually when implementing a class, I copy&paste the functions from the header into the source file. But I still need to prepend the function name with a classname, and optionally a namespace

So I had a function in my source like this:
void func (...);


However, this was a function in class Foo, which was in the namespace abc::def, so I moved the cursor just before "func" and started typing "abc::def::Foo::". However, every time I typed the first colon of ::, VAX inserted parentheses. So right after typing "acd::def:" it inserted a (), so it became "abc::def ()" with the cursor located between the parantheses. I corrected it, but it did it again after typing "::Foo:".

It only seems to do this when you type multiple ::'s in a single line of code. So in my example, it doesn't do it after "abc:", but it does after typing "abc::def:" in a continuous fashion. Also, it only works when you type existing namespace and class names, and the "insert ()..." option has to be turned on.

jpizzi
Tomato Guru

USA
642 Posts

Posted - Apr 26 2004 :  10:30:36 AM  Show Profile
So, you specifically turn on an option to insert (), then complain when the software does what you ask? Strange...

Joe Pizzi
Go to Top of Page

LarryLeonard
Tomato Guru

USA
1041 Posts

Posted - Apr 26 2004 :  10:44:15 AM  Show Profile
quote:
So, you specifically turn on an option to insert (), then complain when the software does what you ask? Strange.
I'm pretty sure you're kidding, right?

I think the bug report is this line: "However, every time I typed the first colon of ::, VAX inserted parentheses". Why should VAX insert parens after a single colon? Doesn't sound right to me... can't think of an example where I'd want parens after a single or even a double colon. (Of course, now Uniwares will pop up with a template-infested example!)
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Apr 26 2004 :  10:44:56 AM  Show Profile
Just tried the following and it did not insert the ()'s. Is this correct?
namespace abc
{
namespace def
{
class Foo
{
int func();
};
}
}
abc::def::Foo::func()

Tried this in both VC6 and 7.1, what IDE are you using?

Whole Tomato Software, Inc.
Go to Top of Page

jpizzi
Tomato Guru

USA
642 Posts

Posted - Apr 26 2004 :  10:45:24 AM  Show Profile
Larry queried:
quote:
I'm pretty sure you're kidding, right?

Yes, I am kidding. (that's why I put the smiley on the post)

Joe Pizzi

Edited by - jpizzi on Apr 26 2004 10:46:44 AM
Go to Top of Page

LarryLeonard
Tomato Guru

USA
1041 Posts

Posted - Apr 26 2004 :  10:48:25 AM  Show Profile
Sorry, it was the horns that threw me off...
Go to Top of Page

jpizzi
Tomato Guru

USA
642 Posts

Posted - Apr 26 2004 :  11:02:38 AM  Show Profile
I thought that meant that the comment was kind of devilish?

Joe Pizzi
Go to Top of Page

LarryLeonard
Tomato Guru

USA
1041 Posts

Posted - Apr 26 2004 :  11:20:41 AM  Show Profile
Well, yes, that's what I mean. I also plead caffeine deprivation and an hour and forty-five minute commute in the rain this morning...
Go to Top of Page

.oisyn
Tomato Guru

162 Posts

Posted - May 02 2004 :  6:14:11 PM  Show Profile
Hmm, I seem to be unable to reproduce the bug. Even if I open the problem in which it happened it works all right now.
Strange, the time when I opened this topic it happened _every_ time I was in the situation I described

Oh I use VC7.1 btw

Edited by - .oisyn on May 02 2004 6:14:46 PM
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