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
 Feature Requests
 Useless tooltip for constructors
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

znakeeye
Tomato Guru

379 Posts

Posted - Dec 16 2008 :  07:50:05 AM  Show Profile  Reply with Quote
CMyClass myClass(0, 1, false);

If I hover "myClass" I expect to see the declaration of the constructor (functions work that way):

Tooltip should be: CMyClass(int index, int subIndex, bool readOnly)

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Dec 16 2008 :  3:58:33 PM  Show Profile  Reply with Quote
Visual Assist shows the type of the object in this case. This is consistent with default intellisense.
You can view the parameters by pressing shift+ctrl+space in between parenthesis.
Go to Top of Page

znakeeye
Tomato Guru

379 Posts

Posted - Dec 17 2008 :  04:42:47 AM  Show Profile  Reply with Quote
I thought VAX wanted to improve IntelliSense :P

I think this would be a good improvement. If you hover "CMyClass" you get the old tooltip, but "myClass" would yield the actual constructor as tooltip. Yes, it makes perfectly sense!
I blame Microsoft!
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Jan 01 2009 :  7:32:43 PM  Show Profile  Reply with Quote
Apologies for the delay in getting back to you about this.

I have been thinking about your idea: the basic difference between functions and your example is that you presented a declaration of a local variable instead of a constructor calling. Ok, it is a special case because the constructor gets invoked when the flow gets into the scope, but I think this is basically a declaration rather than a function calling.

Despite this I would put in a feature request, but I run into problems. Let's see your example with the class declaration:

class CMyClass
{
    CMyClass(int index, int subIndex, bool readOnly);
    void DoIt();
};

class COtherClass
{
    void Member()
    {
        CMyClass myClass(0, 1, false);

        // lots of code here...

        myClass.DoIt();
    }
};


myClass in the first and in the last line of "Member" function treated as the same way, so you will see the same tooltip and definition field on both lines.

The first question is it logical? I think it is.
My second question is about the content of the tooltip. Tooltips and definition fields are basically the same, but in this case definition field is smarter: I see this:

CMyClass myClass(0, 1, false)

over myClass in the last line of the "Method", which is good, because you see the whole definition with the incoming parameters.

This is the same as when you define a variable, for example

int apple=5;

and later you can see the type and the default value of apple without the need of Alt+G.

I think tooltips shouldn't behave differently than context and definition fields. That may would confuse users and I think they expect for similar functionality.

I hope this makes sense.

Edited by - accord on Jan 01 2009 7:51:38 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