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
 Problem with namespace and forward decl. in 1544
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

WheretIB
Junior Member

20 Posts

Posted - Feb 26 2007 :  08:56:24 AM  Show Profile  Reply with Quote
Here is part of my code:
quote:

namespace A
{
//forward declarations
class B;
class C;
class D;
}



When I write A:: , VA doesn't give me any suggestions. Even if I press Alt+Space
Regular forward declarations work just fine, seems that assist have some problems with namespaces.

WheretIB
Junior Member

20 Posts

Posted - Feb 26 2007 :  09:02:12 AM  Show Profile  Reply with Quote
And, finally when I manualy type A::B, VA underlines "B" with red line.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Feb 26 2007 :  1:01:01 PM  Show Profile  Reply with Quote
Is this code in a cpp or .h file?
Which IDE and version of VA are you using?

Using VS2003, VA 1548, and a header file I have added the code:


namespace SPACE_FORWARD_DECLARE
{
	class ForwardDeclareSpaceA;
	class ForwardDeclareSpaceB;
}

static void testForwardDeclariredClasses()
{
	SPACE_FORWARD_DECLARE::ForwardDeclareSpaceA;
	SPACE_FORWARD_DECLARE::orange;
	banana = 3;
}


"orange" and "banana" are both underlined as mistyped symbols by VA, but ForwardDeclareSpaceA is not underlined, and alt-g takes me to the forward declare.

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

WheretIB
Junior Member

20 Posts

Posted - Feb 28 2007 :  09:38:10 AM  Show Profile  Reply with Quote
This is a header file.
I'm using VS2003, and like I said in the title, VA 1544 (1548 wasn't avaible in the morning)
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Feb 28 2007 :  11:28:26 AM  Show Profile  Reply with Quote
My mistake, I missed the VA version in the title bar. 1548 has been posted to the forum, but we held off for a day or two before posting it to our download page. Can you try upgrading to 1548 and see if this makes any difference?

http://www.wholetomato.com/downloads/VA_X_Setup1548.exe

Can you also try copy / pasting my test code into a file and see what happens? It is possible your code has the problem but mine does not.

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

WheretIB
Junior Member

20 Posts

Posted - Mar 03 2007 :  02:46:42 AM  Show Profile  Reply with Quote
Your code in VA1544:
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Mar 05 2007 :  09:16:59 AM  Show Profile  Reply with Quote
I still cannot reproduce this problem. I have created a new, default, C++ console project in VS2003 and added the code. Can you download and open the project on your system, and see what happens please?

http://forum.wholetomato.com/colin/forumimages/5953_font_test.zip

Using this project I only see "orange" and "banana" being underlined.

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

WheretIB
Junior Member

20 Posts

Posted - Mar 09 2007 :  09:25:03 AM  Show Profile  Reply with Quote
I've installed VA1548 now, and underlining there is fine.

But I still do not get any suggestions(even if I press Alt+Space) after I type SPACE_FORWARD_DECLARE::
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Mar 09 2007 :  12:21:00 PM  Show Profile  Reply with Quote
I am seeing the same thing, but for this code this makes sense, since there are no "real" types inside the namespace. Change the code to read:

namespace SPACE_FORWARD_DECLARE
{
	class ForwardDeclareSpaceA;
	class ForwardDeclareSpaceB;

	class ActualClass
	{
		ActualClass();
		int getCount();
	};
}


and now when I type SPACE_FORWARD_DECLARE:: "ActualClass" is listed in a completion listbox.

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

WheretIB
Junior Member

20 Posts

Posted - Mar 14 2007 :  5:16:02 PM  Show Profile  Reply with Quote
When I create a forward declaration, I want to use auto-complition before I create actual class.

//Forward declarations
...
//Some classes and functions, that use them
...
//Forward declared classes definition
...
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Mar 14 2007 :  6:42:09 PM  Show Profile  Reply with Quote
Once you have used the class name once or twice VA should start to suggest it via suggestion listboxes, especially if you have:

VA Options -> Text Editor -> suggestions -> Include bits of code from surrounding lines

turned on.

zen is the art of being at one with the two'ness
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