Author |
Topic |
|
mbobka
Ketchup Master
Russia
86 Posts |
Posted - Jul 03 2006 : 02:48:49 AM
|
Sample:
// header
class AAA {
public:
void Func();
};
// cpp file
void AAA::Func() {
std::string a;
int b;
NewFunc( a, b );
}
When I hover over "NewFunc", then from "down arrow menu" I can call "Add similar member", which will try add new member with signature "void NewFunc( std::string a, int b )" in class "AAA".
|
|
support
Whole Tomato Software
5566 Posts |
Posted - Jul 03 2006 : 6:43:57 PM
|
We believe this problem occurs only in VC6 when the header does not end with a blank line.
Can you confirm this is the case for you?
case=1531 |
|
|
mbobka
Ketchup Master
Russia
86 Posts |
Posted - Jul 04 2006 : 05:15:01 AM
|
Heh... It was a suggestion... Anyway, refactor menu for "NewFunc" for me shows "No refactoring available for symbol", alse NewFunc is underlined with red (it's correct bcs. no declaration for the function is present).
VAX 1526. VS2005 |
|
|
mbobka
Ketchup Master
Russia
86 Posts |
Posted - Jul 04 2006 : 05:16:45 AM
|
Also, "NewFunc" is never defined for any class or global |
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Jul 04 2006 : 6:15:08 PM
|
the problem here is that VA does not know which class you want to add the function to. i see what you are getting at here, but at the same time i can see this opening up a list of related requests, e.g.
CFoo bar; bar.new_member_function();
people then wanting to add "new_member_function()" to CFoo, picking up its parameters at the same time. |
zen is the art of being at one with the two'ness |
|
|
mbobka
Ketchup Master
Russia
86 Posts |
Posted - Jul 05 2006 : 12:53:28 AM
|
If "new_member_function" is not declared in CFoo, then in CFoo, else in current class context. |
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Jul 06 2006 : 5:29:55 PM
|
i shall ask support about this one. personally i rather like the idea, but i am slightly concerned about the scope of the idea. just how much may we be letting ourselves in for here?
i can see a range of possible problem cases, to do with pointers to base classes, etc. |
zen is the art of being at one with the two'ness |
|
|
Admin
Whole Tomato Software
USA
74 Posts |
Posted - Jul 06 2006 : 7:44:05 PM
|
Interesting idea that we'll put on the list to consider. |
|
|
AdyR
Ketchup Master
United Kingdom
75 Posts |
Posted - Jul 17 2006 : 07:57:28 AM
|
I would like to add my vote to this. E.g. if I type just the method name, then add it to the class of the current method: void aClass::someMethod() { x = newFunc(a, b); //Add this to aClass }
but if I qualify it with another class by pointer or direct reference then add it to that class: x = someClass.newFunc(a, b); //Add this to someClass
|
Ady |
|
|
support
Whole Tomato Software
5566 Posts |
Posted - Aug 08 2006 : 01:19:11 AM
|
Case 1531 is fixed in build 1531.
How about that? |
|
|
|
Topic |
|