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
 Autocompletion in VA-X (somehow worse than VA 6)
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

jerzjerzy
New Member

6 Posts

Posted - Apr 06 2004 :  06:56:56 AM  Show Profile
Hello!
First, the code (incomplete, just to show the problem):

// Sample code -------------------
template <class T>
class SPtr
{
T * operator->()
{
...
}
};

class CTest
{
public:
DWORD m_dwVal;
};

SPtr<CTest> spTest;
// End of sample ------------------------

In VA 6 when I typed spTest-> I was given a suggestion list box (with m_dwVal in this case). In VA-X no list box appears. It seems to be a regression from the previous version.
Tested on build 1225.

asmout
Ketchup Master

58 Posts

Posted - Apr 06 2004 :  08:31:09 AM  Show Profile
jerzjerzy,

I just tried pasting the code you posted into one of my files, and typing -> between spTest and the ;. I got a list box as you describe, no problem (I am using VC6/1225).

However, I have also seen strange and unsatifactory behavior with suggestion list boxes and VAX, that I cannot get to be repeatable enough to report.

If you have a repetable case, can you describe steps to reproduce it, using a vanilla MFC app-wizard generated project? That might help the team at WT to locate the problem. Also, they might want to know what options you have selected, etc, etc.
Go to Top of Page

jerzjerzy
New Member

6 Posts

Posted - Apr 06 2004 :  10:04:55 AM  Show Profile
Sigh..
At the moment I'm not able create an example that actually shows this error. My previous example works fine actually (I didn't test it cause I was too lazy to check it) and the code that exhibits this error is much more complicated (not to mention that I cannot post it here since I don't own it).
Go to Top of Page

jerzjerzy
New Member

6 Posts

Posted - Apr 06 2004 :  10:49:39 AM  Show Profile
Try this one:

// tomato_test.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"

template <class _T>
class SPr
{
public:
typedef _T T;
public:
SPr (): _p (NULL) {}
SPr (T* p):
T * operator->()
{
ASSERT(_p);
return _p;
}
const T * operator->()const
{
ASSERT(_p);
return _p;
}
protected:
T * _p;
};

class CTest
{
public:
int m_iVal;
};

int PutData(SPr<CTest> spBuffer)
{
// Autocompletion here:
spBuffer->
}

int main(int argc, char* argv[])
{
return 0;
}
Go to Top of Page

jpizzi
Tomato Guru

USA
642 Posts

Posted - Apr 07 2004 :  10:39:17 AM  Show Profile
Works for me in VA X 1223 in VS .NET 2003.

Joe Pizzi
Go to Top of Page

jerzjerzy
New Member

6 Posts

Posted - Apr 08 2004 :  03:40:49 AM  Show Profile
I'm using VS 6.0 & VAX 1225 and it doesn't work in my case. Here is my stdafx.h:

// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//

#if !defined(AFX_STDAFX_H__F2CEAE17_CAE1_4085_9322_8E61E0AD821C__INCLUDED_)
#define AFX_STDAFX_H__F2CEAE17_CAE1_4085_9322_8E61E0AD821C__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


// TODO: reference additional headers your program requires here

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_STDAFX_H__F2CEAE17_CAE1_4085_9322_8E61E0AD821C__INCLUDED_)
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Apr 08 2004 :  09:41:40 AM  Show Profile
The _T is confusing VA. In <TCHAR.H> _T is defined as #define _T(x) __T(x), so when VA parses the template <class _T>, it gets really confused. After changing the _T to _Tx in you example it worked fine.

Whole Tomato Software, Inc.
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