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
 enum in struct problem(s) / members not listed
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

_FKS_
Junior Member

Canada
13 Posts

Posted - Nov 04 2004 :  10:04:46 AM  Show Profile
I have a struct such as:

struct myTest
{
enum
{
Member1Bits = 10,
Member2Bits = 16,
Member3Bits = 4,

UndefinedMember1 = ( 1 << Member1Bits ) - 1,
UndefinedMember2 = ( 1 << Member2Bits ) - 1,
UndefinedMember3 = ( 1 << Member3Bits ) - 1,
};

unsigned long m_Member1 : Member1Bits;
unsigned long m_Member2 : Member2Bits;
};

When this is parsed by Visual Assist, the 'Undefined*' enums are not recognized, nor the m_Member* variables.
In some other structs I have in my projects, some of the members are recognized in some cases, some not. But if I type explicitely the value of the bitfield instead of the enum's, the member is recognized right away.

Edited by - _FKS_ on Nov 04 2004 2:36:53 PM

support
Whole Tomato Software

5566 Posts

Posted - Nov 04 2004 :  10:56:18 AM  Show Profile
Unfortunately, the left shift and comma in your definition confuse our VA X. It's a quirk, i.e. a bug.

Workaround is to include a second definition that VA X understands, but is not seen by the real parser/compiler. Include the second definition first, and guard it with a #define that is never defined.

#ifdef VAX
struct myTest
{
...
}
#endif
struct myTest
{
...
}

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

case=161
Go to Top of Page

_FKS_
Junior Member

Canada
13 Posts

Posted - Nov 04 2004 :  2:35:06 PM  Show Profile
Well it's ok, I don't necessarily need a workaround for that, I'll wait till it's fixed...

Just another remark, I previously said that some of the member variables were recognized: actually it's not the case, they are only colored in gray (not black) because they match names found in other structures. If you add another structure such as:

struct myOtherTest
{
unsigned long m_Member2;
};

just before struct myTest, then m_Member2 in myTest is now gray instead of black like before. Also the dropdown menus now lists m_Member2 for class myTest when before adding myOtherTest, it didn't. (m_Member1 is still not listed).

I guess this is another bug?
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Nov 04 2004 :  5:54:29 PM  Show Profile
If you have "Guess contents if unknown" enabled in the Listboxes node of our options dialog, it's not a bug. Othewise, we'll examine the issue when we address case 161.
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