Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 1533: First instance: '->' works, '.' doesn't.

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
thruska Posted - Aug 29 2006 : 10:14:50 AM
The first time I use an instantiated class with a local variable, the '.' operator brings up absolutely nothing (without the quotes, of course). I try deleting the '.' and re-adding it and still nothing shows up. I can delete and re-add the '.' any number of times and nothing shows.

However, if I delete the '.' and add a '->', VAX incorrectly shows the drop down selection box that should have shown up with '.'. It is incorrect because correct access to the instance is through the '.' operator. However, if I now delete the '->' and change it back to '.', the same menu shows up and works for all future instances of the class.

I've had this happen twice in the past 24 hours with two different classes. I just can't get it to replicate although I did notice something when I went to try to reproduce the bug: If a class is contained within a class, the inner class stays gray (in color) indicating a variable. Now, I seem to recall that when I was typing in my variable name and pressing '.' to access the class methods, the subclass was still gray (I'm pretty sure it was, but not 100% certain).

I'm not quite sure how I can go about replicating this bug consistently because it goes away as soon as the drop menu shows up after using '->'. I'll try to be more observant should it show up again.
5   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Sep 02 2006 : 2:54:29 PM
using VS2003 and VA 1533 i have just setup the following test case, which seems to be doing the same thing as your code, if i have followed this correctly. since i have used STL classes the access functions are different, but the idea should be the same. in the header i have:

class FelineList
{
public:
    const char *name()    { return "FelineList is my name"; }
    int size()            { return 3; }

public:
    class FelineItem
    {
        const char *name()    { return "FelineItem inside of FelineList is my name"; }
        const char *colour()  { return "chocolate"; }
        int childCount()      { return 0; }
    };
};


and in the cpp file i have added:

static int getCounter()
{
    std::list<std::auto_ptr<FelineList::FelineItem> > listInnerClass;
    listInnerClass.front().get()->childCount();

    return 3;
}


based on your last post, if this was your code, "childCount()" should be underlined as a mistyped symbol. is my understanding of this correct?

using this code i am not getting any underlining, and i am getting reasonable suggestions without any problems.

can you try copy / pasting this code into a couple of files on your machine and see what happens? i am wondering if VA is having problems understanding the template classes you are using. i often use classes that are declared inside other classes and am not aware of any problems with them.
thruska Posted - Aug 30 2006 : 11:29:46 AM
I'm an idiot (that and I'm still waking up). Of course Node->Value-> on a List<size_t> is not going to return anything. Okay. I just tested it with List<BString> and it works fine. It seems to just have problems with a class within a class because I tested it with a class within a class that was different from the one before and the same problems show up. When I say "class within a class", I mean:

class ParentClass
{
public:
class SubClass
{
public:
};
};

I'm definitely having problems with this template. VAX shows a "spell checking" underline thing when I enter a valid variable name after 'Node->Value->' (e.g. Node->Value->Name shows a red underline after) when I use it with a class within a class. Name conflicts seem to have nothing to do with it.
thruska Posted - Aug 30 2006 : 11:15:46 AM
Hmm...that's weird. I typed in '->' and nothing happened this time. I switched back to '.' and still nothing happened. I pressed Ctrl-Space and finally the suggestion list came up. Is this a different bug or is it related to the same thing I was experiencing before?

However, I can't even access the methods of the template without pressing Ctrl+Space. I access the data by doing:

Node = VarName.First();
while (Node != NULL)
{
Node->Value->

Node = Node->Next();
}

Nothing is showing up when I type in 'Node->' and Intellisense comes back and says 'Expression to the left of . or -> could not be resolved' when I type in 'Node->Value->'. The template uses a class inside a class. Sorry to be vague, but this is proprietary code. The declaration looks like:

List<ParentClass::SubClass> VarName;

Note that the 'Value' member variable is a smart pointer template that resolves to:

SmartPtr<ParentClass::SubClass> Value;

I'm thinking this is still related to the scenario where nothing comes back the first time but now I can repeat it consistently. Regular Intellisense just gives up trying to access the class members. I've had problems in the past with the parent class because the name conflicts with a name from the Platform SDK (compiles just fine because the PSDK name is a global variable and this is a class).

I just tried this same template with size_t (List<size_t> VarName;) as the data type and accessing 'Node->Value->' still says that it can't make heads nor tails of it. Also, 'VarName.' and 'VarName->' show the exact same drop down list but only the '.' version is valid. So, it looks like 1533 has problems even with simple data types in templates that use other templates. The closest STL equivalent would be a std::list< SmartPtr<size_t> > VarName;.

I suspect once this issue gets fixed, the weird problem I've been experiencing will go away.
thruska Posted - Aug 30 2006 : 10:48:25 AM
Well, I've waited long enough. I'll continue along with what I was working on.
thruska Posted - Aug 29 2006 : 7:18:43 PM
I just hit a replicated scenario - this time with templates. It is the first time I've used this template since starting up with 1533. The syntax highlighting is correct, so that isn't relevant. I went and ate dinner and came back and the problem still exists. That is, I haven't typed in '->' at this point. So, apparently this is also not some sort of timing issue. I did notice something. The moment I hit the '.', VAX changed the status bar of VS.NET temporarily to indicate it was parsing something. It happened so fast though, I didn't see anything but a blur. Whatever it showed occupied about 3/4 of that portion of the status bar at a 1280x1024 screen resolution. So, the path name was pretty lengthy and I think it was looking at some VS.NET header file but I'm not certain.

However, I will leave my VS.NET project open and in the same state for the next 12-24 hours. If, within this time, a VAX dev. wants me to do something specific to help narrow the problem down a bit, contact me either here on the forum or call me (517-803-4197). I've got plenty of documentation to write that doesn't involve VS.NET, so it isn't a big deal for me to not code for a bit. This is a really hard bug to replicate. I'm certain it is a bug - I've been able to replicate the problem three times so far today. Twice with classes, once with a template. And I'm currently sitting at the optimal spot for catching the bug in action. Couldn't ask for a much better setup.

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