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
 1624 and default parameter values
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Jan 01 2008 :  7:30:52 PM  Show Profile  Reply with Quote
Tooltips are showing now weird default parameter values:

Its showing the equalsign but no value after it. At first I thought it might be because of the commented default value in the implementation, but its not related at all.

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Jan 02 2008 :  10:06:04 AM  Show Profile  Reply with Quote
My tooltip is different to yours, I am seeing "{...}" at the end of the tooltip, after the closing bracket, and no equals sign after szNullValue. This could be because my test is not a good reflection of your code though.

Something else is bothering me, you have a suggestion listbox there, rather than a member listbox. When typing after a dot you should get a member listbox. Are you normally getting suggestion listboxes after a dot?

If so this might be related to the parameters being underlined as mistyped symbols.

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

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Jan 02 2008 :  12:25:14 PM  Show Profile  Reply with Quote
Yes, i am getting lots of strange stuff lately, and with code that didnt cause troubles before with older VAX versions.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Jan 03 2008 :  08:32:16 AM  Show Profile  Reply with Quote
Do you remember if VA 1561, or any of the VA 15xx builds, showed these problems?
There is a second user reporting many problems in VA 1624, but VA 1561 works reliably for him.

On my test systems VA 1624 seems to work just as well, or better, than VA 1561. So obviously something "odd" is going on, and causing these problems.

Are you seeing underlining of parameters in header files? Or is this only in cpp files?

Do you have the time to open one of the files with underlined parameters on its own, in a separate IDE, so no loaded solution? I am wondering if the problem still shows up. Once you make an edit, to trigger underlining of mistyped symbols, I would expect the class and member function names to be underlined, but not the parameter names.

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

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Jan 03 2008 :  09:04:33 AM  Show Profile  Reply with Quote
As far as I can tell, these problems started with the 16xx versions. But it was not as bad as it is now. Underlining seems to happen only in cpp files. Have to test with inline functions though.
I will do some testing later, as its a busy day (week, month, year?) for me.
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Jan 03 2008 :  09:16:34 AM  Show Profile  Reply with Quote
Seems the tooltip problem occurs only with empty string defaults like: char* szWhatever="" and only with the VAX tooltips of course.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Jan 03 2008 :  2:17:29 PM  Show Profile  Reply with Quote
Are you seeing this underlining problem in all cpp files? You do need to make an edit in a cpp file before VA starts underlining, so simply opening files and looking will not be enough to trigger it.

If you use alt-g on one of these functions, and add a mistyped symbol to the header file, next to the prototype, what gets underlined?

I would expect to see the parameters underlined in the header file as well as the cpp file, even though I have no idea why they are being underlined to start with.

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

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Jan 03 2008 :  3:17:42 PM  Show Profile  Reply with Quote
Ok, did some testing here.
I do have to edit the file, even inserting an empty line does the trick and ALL parameters are underlined. I have to close the file and reopen to get rid of underlines.
Problem occurs in each and every file, even .h as I saw now.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Jan 04 2008 :  11:56:30 AM  Show Profile  Reply with Quote
If you open a single file, on its own, without opening your solution, do you still see this problem?

Can you please export your VA and IDE settings and send them to me:

VA Options -> Performance -> Export Settings
IDE tools menu -> Import and Export Settings -> Export selected environment settings

I am starting to think this is some form of settings problem, rather than anything in the code.

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

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Jan 04 2008 :  3:13:56 PM  Show Profile  Reply with Quote
Are you using #define statements for the start and end of a namespace in all of the files where you are seeing this problem? From memory you often do this in your code.

A user is reporting simple #define statements for a namespace have caused problems in this thread:

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

so I am wondering if there could be any connection with the problem you are seeing.

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

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Jan 04 2008 :  7:11:57 PM  Show Profile  Reply with Quote
Yes, actually I do use namespace defines in those projects. Gonna try without them.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Jan 05 2008 :  1:42:49 PM  Show Profile  Reply with Quote
We are working on a new build with some bug fixes, that might help you, if the #defines for the namespaces really are the cause of the problem.

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

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Jan 07 2008 :  07:59:54 AM  Show Profile  Reply with Quote
Ok, it is definitely related to namespaces in macros. Removing the macros, everything works just fine (related to the underlined parameters at least).
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Jan 07 2008 :  08:54:22 AM  Show Profile  Reply with Quote
Apparently the fix for:

case=9784

which is due in the next build might help. I am not sure when this next build is due, we are trying to fix the crashing problem some people are seeing with 1624 in the next build.

For now you may find downgrading to an earlier build will help:

http://www.wholetomato.com/support/history.asp

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

sean
Whole Tomato Software

USA
2817 Posts

Posted - Jan 18 2008 :  11:10:11 AM  Show Profile  Reply with Quote
case=9784 is fixed in build 1626
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Jan 18 2008 :  12:31:36 PM  Show Profile  Reply with Quote
No more underlined parameters, but yet no suggestions or completions for them in 1626.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Jan 18 2008 :  12:44:56 PM  Show Profile  Reply with Quote
Well thats progress of a sort. If you turn on:

VA Options -> Advanced -> Fonts and Colors -> Local symbols in Bold

are the parameters shown in bold? If they are properly recognised they should be. If they are not bold this is probably why they are not being suggested.

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

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Jan 18 2008 :  12:46:23 PM  Show Profile  Reply with Quote
Do I have to? Its so ugly!
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Jan 18 2008 :  12:47:32 PM  Show Profile  Reply with Quote
Ok, yes, they are bold as they are expected to be.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Jan 18 2008 :  3:26:47 PM  Show Profile  Reply with Quote
*sigh* so something has been fixed, but not quite enough. Can you try adding this simple test function to a cpp file please:

static void testFelineParamSuggest(int nFelineOne, int nFelineTwo, int nChocolateOne, int nChocolateTwo)
{
	|
}

For me, when I type "nfe" VA immediately suggests the first two parameters.
And when I type "nch" VA immediately suggests the second two parameters.

Are you getting suggestions at all?
Do the suggestions make any sense? Or are they just completely "random"?

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

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Jan 18 2008 :  4:24:49 PM  Show Profile  Reply with Quote
You asked for it:







But guess what... outside of my namespace macros it almost works.






Is there any way to turn off the VA snippets? They are quite annoying most of the time as it works now.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Jan 18 2008 :  6:55:29 PM  Show Profile  Reply with Quote
Simply turn off:

VA Options -> Advanced -> Suggestions -> Include VA Snippets in listboxes


What is the difference between the earlier and the later screen shots? Simply that VA has had more time to work out what is going on here, and is now suggesting the parameters? Or something else?

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

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Jan 18 2008 :  6:57:24 PM  Show Profile  Reply with Quote
That simple? Damn.

The difference between the first and the second set of shots is the namespaces macro (its actually written there inbetween), so it seems that its really the namespaces problem which causes many of the other problems.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Jan 18 2008 :  8:34:27 PM  Show Profile  Reply with Quote
Sometimes it really is that easy, but only occasionally

I completely missed that line of text, it "blurred" into the pictures in my mind. The second set of pictures look 100% correct to me, given that Snippets are active and are taking priority when you type "nf"

How many namespace macro's are required to break this? Just one namespace? Or several nested inside of each other?

Are you doing this in a cpp file or a header file? I know I mentioned cpp file, but just double checking.

zen is the art of being at one with the two'ness

Edited by - feline on Jan 18 2008 8:35:05 PM
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Jan 18 2008 :  8:49:26 PM  Show Profile  Reply with Quote
Seems that it happens with even one namespace in a macro already. And I am doing it in a cpp file as requested.

I would really like to have the option to choose what takes priority in the lists. Snippets are much less frequently used than parameters or local variables. What about a priority list in the options?
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Jan 18 2008 :  9:33:56 PM  Show Profile  Reply with Quote
It looks like you have some old default snippets in your lists. Delete the ones you won't ever use. When you need to write "!= false" are you going to think 'nf'? Probably not. Delete it (and many of the others); then allow snippets into the lists. If you've never modified the snippets just delete your local user *.tpl files. VA will copy the latest installed versions from the installation directory (at IDE startup).
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Jan 19 2008 :  09:15:28 AM  Show Profile  Reply with Quote
There is something going on here that I cannot reproduce so far. I have added the following macro's to a header file:

#define BEGIN_FELINE_NAMESPACE(x) namespace x {
#define END_FELINE_NAMESPACE };

and the following code to the matching cpp file:

BEGIN_FELINE_NAMESPACE(FELINE_SPACE_ONE)

BEGIN_FELINE_NAMESPACE(FELINE_SPACE_TWO)

BEGIN_FELINE_NAMESPACE(FELINE_SPACE_THREE)

static void testFelineParamSuggest(int nFelineOne, int nFelineTwo, int nChocolateOne, int nChocolateTwo)
{
	
}

END_FELINE_NAMESPACE

END_FELINE_NAMESPACE

END_FELINE_NAMESPACE

The cpp file includes the header file. The project compiles quite happily. When I start typing inside the function VA immediately suggests the parameter names.

I started with just one namespace, and slowly worked up to three. The IDE has been restarted multiple times to make sure that VA has had ample chance to catch up.

Is there some obvious difference between what I am doing, and what you are doing with the namespace macro's?

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

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Jan 19 2008 :  09:37:49 AM  Show Profile  Reply with Quote
The only difference is that I dont use dynamic macros, everything is predefined without parameters.

like:

#define BEGIN_NAMESPACE_UNIWARES           namespace Uniwares {
#define BEGIN_NAMESPACE_UNIWARES_DATA      BEGIN_NAMESPACE_UNIWARES namespace Data {
#define BEGIN_NAMESPACE_UNIWARES_DATA_XYZ  BEGIN_NAMESPACE_UNIWARES_DATA namespace xyz {
...
#define END_NAMESPACE_UNIWARES             }
#define END_NAMESPACE_UNIWARES_DATA        END_NAMESPACE_UNIWARES } /* data */
#define END_NAMESPACE_UNIWARES_DATA_XYZ    END_NAMESPACE_UNIWARES_DATA } /* xyz */


this is defined in a namespaces.h which is included in the precompiled header file.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Jan 19 2008 :  1:19:29 PM  Show Profile  Reply with Quote
*sigh* I thought when I saw your namespace macros that I knew the problem. This is reminding me of this thread:

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

where part of the trigger seems to be curly brackets inserted via a macro calling a macro. Which is what you have here. Except that I still cannot reproduce this problem. I now have this code in a header file:

#define BEGIN_NAMESPACE_FELINE           namespace FELINE_MACRO_SPACE {
#define BEGIN_NAMESPACE_FELINE_DATA      BEGIN_NAMESPACE_FELINE namespace Data {
#define BEGIN_NAMESPACE_FELINE_DATA_XYZ  BEGIN_NAMESPACE_FELINE_DATA namespace xyz {

#define END_NAMESPACE_FELINE             }
#define END_NAMESPACE_FELINE_DATA        END_NAMESPACE_FELINE } /* data */
#define END_NAMESPACE_FELINE_DATA_XYZ    END_NAMESPACE_FELINE_DATA } /* xyz */

and this code in the matching cpp file:

BEGIN_NAMESPACE_FELINE_DATA_XYZ

static void firstFunction()
{
	{
		{
			{

			}
		}
	}
}
static void secondFunction() { }

static void testFelineParamSuggest(int nFelineOne, int nFelineTwo, int nChocolateOne, int nChocolateTwo)
{
	|
}

END_NAMESPACE_FELINE_DATA_XYZ


Can you try adding this code to your solution please, outside of any namespace macro's, and see what happens? I have renamed the macro's so you can do this without any clashes.

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

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Jan 21 2008 :  08:05:07 AM  Show Profile  Reply with Quote
Doesnt work for me. Copied everything as you asked, and no useful suggestions. Although the parameters are shown as local symbols.
Closed/reopened .h and .cpp files, no useful suggestions.
Closed/reopened the IDE... useful suggestions.

Interesstingly the word FELINE_MACRO_SPACE is in black, as if unrecognized as anything.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Jan 21 2008 :  09:02:53 AM  Show Profile  Reply with Quote
I see the same colouring of FELINE_MACRO_SPACE. Thinking about it, it makes sense. Since this is part of a macro it cannot really be evaluated as "normal" code. It only makes sense when the macro has been expanded.

Do you have time to create a new default project and copy / paste this code into it?

Obviously there is something different, something else, about your system.

Which OS are you using?
Are you still using VS2005 Team Suite edition?

zen is the art of being at one with the two'ness
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000