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
 No suggestion list for dereferenced pointer
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

mike6900
Junior Member

13 Posts

Posted - Aug 05 2005 :  08:00:28 AM  Show Profile
No suggestion lists for dereferenced pointers in .c file. The .h file contains the struct referenced in the corresponding .c file. If I turn on the 'include bits of code from surrounding lines' option then I get a suggestion list with a single entry 'pGuiObj'.

static int deregisteredStatus_Action(void* pCallData, BookObj_t* pBookObj)
{
PttAppBookObj_t* pThis;
pThis = (PttAppBookObj_t*)pBookObj;
pThis-> // this dereference gives me no suggestion list.
...
if (pThis->pGuiObj)
...
}



Visual Studio 6.0

VA_X.dll file version 10.1.1418.0 built 2005.06.24
Licensed to:
VA X:
VAOpsWin.dll version 1.2.0.4
MSDev.exe version 6.0.9782.2
Devshl.dll version 6.0.9782.0
Devedit.pkg version 6.0.9782.0
Font: Courier -16(Pixels)
Comctl32.dll version 5.82.2800.1106
WindowsNT 5.1 Build 2600 Service Pack 1
2 processors

mike6900
Junior Member

13 Posts

Posted - Aug 05 2005 :  08:14:48 AM  Show Profile
In this case I'm referring to Member List boxes.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Aug 06 2005 :  5:12:36 PM  Show Profile
strange. using VC6 and VAX 1418 i added the following structure (modified from something else i was testing) to a .h file:

typedef struct FelinePointerTest
{
    int nInitial;
    int nSecond;
    boolean bWorking;
    short nCounter;
} FelinePointerTest;


in the matching cpp file i them added the code:

static int deregisteredStatus_Action(void* pCallData, void* pBookObj)
{
    FelinePointerTest* pThis;
    pThis = (FelinePointerTest*)pBookObj;
    pThis|

    if(pThis->bWorking)
    {
    }
}


when i type "." it is converted to "->" and i get the correct suggestion list. i would expect VAX to simply respond to the type of your pointer, and not care how it was assigned.

if you hover the mouse over PttAppBookObj_t is the HCB updated correctly? if you use alt_g are you taken to the correct place? i am wondering if VAX simply does not know about this type.

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

mike6900
Junior Member

13 Posts

Posted - Aug 08 2005 :  12:55:16 PM  Show Profile
If I hover the mouse over PttAppBookObj_t the HCB is updated correctly except for the additional member names that no longer exist in the structure.

alt_g does not take me to the correct place.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Aug 08 2005 :  4:10:19 PM  Show Profile
this is very strange. perhaps this is a symptom of your other problem, where VAX is not detecting changes to the structure.

grasping at straws here, but what directory is the definition of PttAppBookObj_t in? specifically how does this directory relate to your IDE and VAX settings, and any stable include files?

if VAX has been told this is a stable include file this might explain some of these effects. at the same time if VAX is not reliably detecting this file then that also might help explain these effects.

where does alt_g take you? does it give you more than one option to choose between? can you see any relationship between where alt_g takes you and the definition of this structure?

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 - Aug 08 2005 :  11:21:26 PM  Show Profile
What happens when you do Alt+g for an instance of the struct?

Is the header located in a directory specified in the project AdditionalIncludeDirectory list?

Does a manual reparse of the header (check the VA toolbar) in which the struct is defined fix the problem?
Go to Top of Page

mike6900
Junior Member

13 Posts

Posted - Aug 09 2005 :  12:45:43 PM  Show Profile
The directory for the header is not listed as a stable include file but is listed under Custom->Other include files.

The header file resides in a subdirectory of the source files.

The header file directory is not listed in the project AdditionalIncludeDirectory list.

A manual reparse of the header does not fix the problem.

I can dereference a pointer in the first function in the .c file and get the correct popup member list. However, if I go to another function in the same file and dereference a pointer to the same struct then I do not get the popup member list. I get a guess suggestion list.
Go to Top of Page

mike6900
Junior Member

13 Posts

Posted - Aug 09 2005 :  1:18:00 PM  Show Profile
The very first dereference in the .c file works as expected ( 'pThis->' generates the correct popup member list). However, in order to generate the member list popup for subsequent dereferences i need to dereference this way 'pThis->.'
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Aug 10 2005 :  5:07:56 PM  Show Profile
to me this suggests that something is going on in the cpp file between the first deference and the second dereference that is confusing VAX.

could you try a dereference on the line immediately below the first dereference? this should prove or disprove my idea. if this works can you binary chop through the file looking for the point where this stops working? code breaking VAX's parser is rare, but not totally unheard of.

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

mike6900
Junior Member

13 Posts

Posted - Aug 11 2005 :  08:33:32 AM  Show Profile
pThis->
}
else
{
pThis->
pThis->
// something went wrong, make sure to free any resources
if ( pThis != NULL )
{
pThis->.
/// @todo Release any allocated memory here.
// release the object
FREE_THE_DATA(&pThis);
pThis->.
pThis = NULL;
pThis->.
}

You can see above where i type the first dereference 'pThis->.' is where it breaks for the rest of the file. It is not always consistently breaking on that line. It may break on the following line.
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Aug 12 2005 :  7:17:05 PM  Show Profile
What do the VA context and definition windows display when the caret is on that first use of pThis?
And how about when the caret is on the first use of pThis where you need to do ->.?
Go to Top of Page

mike6900
Junior Member

13 Posts

Posted - Aug 18 2005 :  08:22:48 AM  Show Profile
The context field and definition field display the same data for both 'pThis->' and 'pThis->.'

context field: PTT_App_CreateObj.pThis
definition field: PttAppBookObj_t* pThis = NULL
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Aug 18 2005 :  6:38:54 PM  Show Profile
Any chance of sending in the .c/.h file to [email protected]?

If not, then how about making a copy of the two files and then trying a process of elimination to see if the problem goes away at some point?
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000