Author |
Topic |
|
.oisyn
Tomato Guru
162 Posts |
Posted - Apr 25 2004 : 7:43:12 PM
|
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
|
So, you specifically turn on an option to insert (), then complain when the software does what you ask? Strange... |
Joe Pizzi |
|
|
LarryLeonard
Tomato Guru
USA
1041 Posts |
Posted - Apr 26 2004 : 10:44:15 AM
|
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!)
|
|
|
support
Whole Tomato Software
5566 Posts |
Posted - Apr 26 2004 : 10:44:56 AM
|
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. |
|
|
jpizzi
Tomato Guru
USA
642 Posts |
Posted - Apr 26 2004 : 10:45:24 AM
|
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 |
|
|
LarryLeonard
Tomato Guru
USA
1041 Posts |
Posted - Apr 26 2004 : 10:48:25 AM
|
Sorry, it was the horns that threw me off...
|
|
|
jpizzi
Tomato Guru
USA
642 Posts |
Posted - Apr 26 2004 : 11:02:38 AM
|
I thought that meant that the comment was kind of devilish? |
Joe Pizzi |
|
|
LarryLeonard
Tomato Guru
USA
1041 Posts |
Posted - Apr 26 2004 : 11:20:41 AM
|
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...
|
|
|
.oisyn
Tomato Guru
162 Posts |
Posted - May 02 2004 : 6:14:11 PM
|
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 |
|
|
|
Topic |
|