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
 Alt-G not working
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

daves
New Member

8 Posts

Posted - Jun 20 2007 :  12:14:40 PM  Show Profile  Reply with Quote

I am working in code that has a

#define APP CMyApp* pApp = (CMyApp*)AfxGetApp();

in a global header and in thousands of places throughout the code it does things like

APP;
pApp->DoSomething();

(I don't necessarily endorse this programming practice)

No VAX functions work on the above call, Alt-G can't find or take me to the DoSomething() function, it just quietly does nothing. VAX is underlining pApp as being undefined, so it doesn't even recognize it as being a method call.

But, F12 in VS2005 takes me to the correct function every time. Even though this is a questionable programming practice, it annoys me that F12 works when Alt-G doesn't.

Is there some trick I can do in VAX so that it recognizes this construct? Maybe some entry in the parser-helper file or something?

Failing that, could you have an option for VAX on VS2005 where if Alt-G finds that it cannot do anything, let the VS2005 F12 functionality have a go at it?



feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Jun 20 2007 :  4:29:15 PM  Show Profile  Reply with Quote
In a simple test the following fixes the problem for me. Edit VA's "StdAfx.h" file as explained in this FAQ entry:

http://docs.wholetomato.com?W302

and add the entry:

#define APP CMyApp* pApp;

at the bottom. This file is used to help VA's parser with difficult code, and can be used to work around odd effects. After modifying this file you need to rebuild the VA symbol database for the changes to take effect:

VA Options -> Performance -> General -> Rebuild symbol databases

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

daves
New Member

8 Posts

Posted - Jun 20 2007 :  6:08:20 PM  Show Profile  Reply with Quote

That did indeed fix it for one project.

But I have several projects that follow this practice, eg the next project has
#define APP CMyOtherApp* pApp = (CMyOtherApp*)AfxGetApp();

If I put multiple #define APP entries for the same symbol in VAX's StdAfx.h it seems to only honor the first one. So I can make it work for one project at a time.

Is there any way to get this construct to work in general, like F12 does?


Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Jun 21 2007 :  10:48:47 AM  Show Profile  Reply with Quote
Unfortunately I don't know of any current way do to this. I have put in a bug report for VA not understanding these macro's:

case=7216

and also a feature request for VA to call the IDE's Go To Definition if alt-g has no idea what to do:

case=7217

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

daves
New Member

8 Posts

Posted - Jan 06 2008 :  2:08:08 PM  Show Profile  Reply with Quote
Any progess on this? Adding the case 7217 feature would be a VERY welcome addition to the product.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Jan 07 2008 :  08:21:31 AM  Show Profile  Reply with Quote
Unfortunately no progress on this yet. It is still on our list of things to look at.

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

Mike from reFX
Junior Member

24 Posts

Posted - Jan 14 2008 :  06:47:39 AM  Show Profile  Reply with Quote
162xx is also a step backwards for me. When I press ALT+G I am taken to the header-file where the method/function is defined, but pressing ALT+G again doesn't take me to the implementation. It simply stays in the header-file. Extremely annoying and a huge time-waster.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Jan 14 2008 :  08:21:02 AM  Show Profile  Reply with Quote
Which IDE are you using?
Are you seeing this problem for all types? Or only some types?
Is there any pattern to where you see this problem?

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

Mike from reFX
Junior Member

24 Posts

Posted - Jan 14 2008 :  5:25:27 PM  Show Profile  Reply with Quote
VS 2005 Professional. I'm seeing this with C++ files where ALT+G does *always* jump to the header-file.

Also sometimes when I type and complete a suggestion by pressing return, left of the cursor (essentially the whole line, but not every column) gets filled with random japanese or chinese-characters for half a second. Very weird.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Jan 15 2008 :  08:04:49 AM  Show Profile  Reply with Quote
Can you turn On:

VA Options -> Performance -> Parse all files when opening a project

and restart the IDE. Does this make any difference to alt-g?

Which version of VA are you using? We have been fixing some font drawing issues in recent builds, and VA 1624 contains all of the fixes. Are you using a localised OS? Normally I cannot get a standard English system to show Japanese or Chinese characters. I have to install the language packs before this starts to work.

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

Mike from reFX
Junior Member

24 Posts

Posted - Jan 15 2008 :  5:03:59 PM  Show Profile  Reply with Quote
Yes, with this option enabled it works fine again, but now I have to wait several minutes each time I open my solution...

I use VA 1624 and I use the German ultimate edition of Vista with the English language pack installed. Neither the Japanese nor the Chinese language packs are installed, but the fonts may contain a lot of Kanji characters. It really looks totally random and only flickers up sometimes for only a split second.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Jan 16 2008 :  12:42:56 PM  Show Profile  Reply with Quote
This option exists to help speed up loading very large solutions, but unfortunately turning it off causes a significant impact on how well alt-g is able to work. This is by design.

The random characters, are you able to grab a screen shot of this?
I may have seen the same thing happen on VS2005 without VA installed, but for me it is very rare. I might see it once in several months. For me it effects an entire line of text, replacing all of the characters on this single line with "random" "noise", coloured squares, this sort of thing. This effect is fairly stable, once it happens it takes a while for it to go away.

So it sounds like you are seeing something a bit different.

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

Edited by - feline on Jan 16 2008 1:12:34 PM
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