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
 1543: multiple "using namespace" and Alt-G problem
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

mertkew
New Member

Germany
8 Posts

Posted - Dec 20 2006 :  05:13:51 AM  Show Profile  Reply with Quote
WinXP SP2, VS 2003 SP1

Try this code:

--------------------
myclass.h
--------------------

namespace xyz
{
  namespace abc {  }

  class MyClass
  {
  public:
    MyClass(void);
    void fooFunc(int a); // Alt-G on fooFunc does nothing
    void fooFunc(bool b); // Alt-G on fooFunc jumps to above fooFunc()
    virtual ~MyClass(void);
  };
}


--------------------
myclass.cpp
--------------------

#include "myclass.h"

using namespace xyz;
using namespace abc; // <<<---- source of the problem

MyClass::MyClass(void)
{}

MyClass::~MyClass(void)
{}

void MyClass::fooFunc( int a ){} // Alt-G on fooFunc offers the both 
                                 // fooFunc() from the myclass.h

void MyClass::fooFunc( bool b ){}// Alt-G on fooFunc offers the both 
                                 // fooFunc() from the myclass.h


mertkew
New Member

Germany
8 Posts

Posted - Dec 20 2006 :  06:22:14 AM  Show Profile  Reply with Quote
Here is another problem connected to multiple "using namespace" and ALT-G:

--------------------
myclass.h
--------------------
namespace xyz
{
  namespace abc {  }

  class MyClass
  {
  public:
    MyClass(void);
    void fooFunc(int a); // Alt-G on fooFunc does nothing
  };
}


--------------------
myclass.cpp
--------------------
#include "myclass.h"

using namespace xyz;
using namespace xyz::abc; // if you remove this Alt-G will work again

MyClass::MyClass(void) { }

void xyz::MyClass::fooFunc( int a ) { } // Alt-G jumps to fooFunc in myclass.h
  // ^^^^^--- alternatively if you remove this Alt-G will work again
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Dec 20 2006 :  3:01:34 PM  Show Profile  Reply with Quote
the first problem, have you tried it with the actual code you posted? I have tried the code you posted, and a variation of it where I renamed everything and moved things around, and alt-g is working correctly for me.

True I am seeing an extra item being offered sometimes, but I an not seeing any significant problems.

zen is the art of being at one with the two'ness
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Dec 20 2006 :  4:11:31 PM  Show Profile  Reply with Quote
the second problem I can reproduce, exactly as you describe it. for now the obvious work around is not to mix both "using namespaces" lines with fully qualified functions.

case=4204

zen is the art of being at one with the two'ness
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Dec 20 2006 :  5:11:32 PM  Show Profile  Reply with Quote
while working on the bug reported in this thread:

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

I seem to have reproduced your problem 1, just using slightly different code.

case=4205

zen is the art of being at one with the two'ness
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Jan 17 2007 :  3:44:42 PM  Show Profile  Reply with Quote
Cases 4204 and 4205 are fixed in 1544.
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