Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 1624 and default parameter values

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
Uniwares Posted - Jan 01 2008 : 7:30:52 PM
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.
30   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Jan 23 2008 : 2:21:06 PM
it takes a bit of time, a lot longer than it takes for you, but it is happening again. I have screen shots, and extensive notes. Lets see if our developers can make anything of this:

case=11759
Uniwares Posted - Jan 22 2008 : 8:14:23 PM
Usually after the first edit already. As soon as I start typing VAX seems to loose track of the details too
feline Posted - Jan 22 2008 : 7:44:38 PM
*um* I am loosing track of the details. Too many threads and bug reports floating around in my head.

How long does this effect take to show up on your system?
Uniwares Posted - Jan 22 2008 : 7:37:00 PM
As I already mentioned, restarting the IDE solves the problem, but this is not really a viable solution to the problem (I mean, restarting the IDE after every new function or class member). But I am very happy that you see the problem too. That should already help the developers to get to the point. You have the files. Let the WT devs dig into it...
feline Posted - Jan 22 2008 : 7:27:28 PM
*frustrated sigh* I hate this problem.

I have the files, many thanks for them. VS2005 professional refused to open the project, saying it could not find the properly page. So I simply created a new, default C++ console project and added all of the files to it.

There is nothing odd or strange in any of the files, I have been through all of them.

I tested every cpp file. I pasted in the test function:

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


at several different points in each file, and tested the suggestions. They worked perfectly every time.

I then started working through the header files, doing the same test. Always before, and inside, and after the namespace macro's. The first few header files worked perfectly, but then I ran into the problem. Exactly the effect you described, VA simply would not suggest the parameters, even though they were shown as local parameters in bold.

Try the same test outside the namespace macro's, and the suggestions worked.

The problem was file specific, I had it in only two of the header files, but it was failing 95% of the time. I could find no good pattern or reason for why these two headers only.

At first I thought it was happening because the header file defining the macro's was not included, but alt-g worked, VA showed the correct macro definition in the definition field, and headers where suggestions worked did not seem to be including the file that defined the macro's.

I then restarted the IDE, to double check.

Now I cannot reproduce the problem, it is just gone.

Can you try restarting your IDE please, and see if that makes any difference?
feline Posted - Jan 22 2008 : 09:19:34 AM
Hopefully the files will shed some light on this. It would be nice.

I suspect something is confusing our parser. We have other users also reporting "odd" problems, but so far no one has been able to pin down what is going on.
Uniwares Posted - Jan 22 2008 : 07:20:03 AM
Works just fine in a new project.

Anyway, I made some tests like removing namespaces from the .h/.cpp file, etc. and I am getting lots of different results, depending on what I include or not. As someone else pointed out "using namespace" makes a difference, using explicit global scope makes a difference, etc.

I had it at one time that VAX would not recognize std::string anymore although the header file was included, yet ::std::string would be fine.

I will send you (feline) my namespaces file and a typical .h/.cpp file so you can experiment with them.
Uniwares Posted - Jan 21 2008 : 7:24:35 PM
Sorry, but I feel that programming is an exact science, otherwise it would be called lottery. "Guessing" is not good enough. Better dont even try then.

I have the feeling that "something" is corrupting part of the VAX database when I start editing a project.
feline Posted - Jan 21 2008 : 3:22:32 PM
"Data" on the macro line, for me this is italic, and VA thinks it is "namespace System.Data" Since it is not sure, it is just "guessing".

No, I have just tried this on my VS2005 Team Suite machine, exactly the same results. The suggestions work perfectly for me.

That machine is running winXP, so we can probably rule out IDE and OS as the triggers.
Uniwares Posted - Jan 21 2008 : 11:11:13 AM
I dont agree with you on the "its part of a macro..." because then the next macro which contains namespace Data should be colored equally, but Data is blue. So VAX does "some" interpretation on the macro contents anyway. My full namespace.h is colored like the Windows color dialog, you find just about every possible color there, not that it would make much sense.

I will have a shot at the new project a bit later.

OS is still Windows XP and VS2005 Team Suite (it didnt change since at least one year).
feline Posted - Jan 21 2008 : 09:02:53 AM
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?
Uniwares Posted - Jan 21 2008 : 08:05:07 AM
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.
feline Posted - Jan 19 2008 : 1:19:29 PM
*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.
Uniwares Posted - Jan 19 2008 : 09:37:49 AM
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.
feline Posted - Jan 19 2008 : 09:15:28 AM
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?
sean Posted - Jan 18 2008 : 9:33:56 PM
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).
Uniwares Posted - Jan 18 2008 : 8:49:26 PM
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?
feline Posted - Jan 18 2008 : 8:34:27 PM
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.
Uniwares Posted - Jan 18 2008 : 6:57:24 PM
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.
feline Posted - Jan 18 2008 : 6:55:29 PM
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?
Uniwares Posted - Jan 18 2008 : 4:24:49 PM
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.
feline Posted - Jan 18 2008 : 3:26:47 PM
*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"?
Uniwares Posted - Jan 18 2008 : 12:47:32 PM
Ok, yes, they are bold as they are expected to be.
Uniwares Posted - Jan 18 2008 : 12:46:23 PM
Do I have to? Its so ugly!
feline Posted - Jan 18 2008 : 12:44:56 PM
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.
Uniwares Posted - Jan 18 2008 : 12:31:36 PM
No more underlined parameters, but yet no suggestions or completions for them in 1626.
sean Posted - Jan 18 2008 : 11:10:11 AM
case=9784 is fixed in build 1626
feline Posted - Jan 07 2008 : 08:54:22 AM
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
Uniwares Posted - Jan 07 2008 : 07:59:54 AM
Ok, it is definitely related to namespaces in macros. Removing the macros, everything works just fine (related to the underlined parameters at least).
feline Posted - Jan 05 2008 : 1:42:49 PM
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.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000