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
 Auto-complete parameters
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

znakeeye
Tomato Guru

379 Posts

Posted - Sep 08 2006 :  3:07:06 PM  Show Profile  Reply with Quote
Couldn't come up with a better subject :P

BOOL CMyWnd::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
// You often want to call the same function in the parent class.
// Here it would be nice if "pWnd, nHitTest, message)" was
// generated.
return CWnd::OnSetCursor(_
}

What do you think? Is it just me, or would this speed up framework coding a bit?

feline
Whole Tomato Software

United Kingdom
18948 Posts

Posted - Sep 09 2006 :  09:53:14 AM  Show Profile  Reply with Quote
in this particular case i would expect to see VA suggest the correct parameter name after the first or second letter was typed, via a suggestion listbox (question mark icons), making this already nice and quick

the main framework i program in is Qt, in C++, and there I only tend to redefine functions like this when i am changing how they work. a good, and fairly common example for me is the paint function for an entry in a list.

i would replace the colour parameter with a custom colour, based on the properties of that specific entry in the list.

so my experience is that i never want to simply pass the parameters through, i always want to modify at least one of them.

the main exception is class constructors, where i often want to pass the common parameters on to the parent class untouched. but even here my derived class often takes extra parameters that the base class will not understand.

is this a peculiarity of the Qt framework? or just a peculiarity of how i personally program? it seems odd you would have to reimplement common functions like this, for no particular gain.

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

jpizzi
Tomato Guru

USA
642 Posts

Posted - Sep 09 2006 :  6:16:43 PM  Show Profile  Reply with Quote
I would think that it would be common to extend the base functionality by calling the base, then performing some other actions that are specific to your application. In this way, you might want exactly what znakeeye is asking for.

Not using frameworks too often, I can't comment on the level of benefit this would provide. Let's see what others think....

Joe Pizzi
Go to Top of Page

schoenherr
Tomato Guru

Germany
160 Posts

Posted - Sep 11 2006 :  01:03:16 AM  Show Profile  Reply with Quote
i think that this feature request is really worth to consider.
1) i completely agree with jpizzi
2) i often have to do the following in an overwritten method: decide if i have to do some special things or simply call the base implementation and do nothing

in both cases i would need to pass exactly all parameters.
and there is a third common (though ugly) case
3) delegator methods (for instance to resolve ambiguousness [thanks to muliinheritance])
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18948 Posts

Posted - Sep 16 2006 :  3:19:53 PM  Show Profile  Reply with Quote
these are very solid arguments so i have put in a feature request

case=2547

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

znakeeye
Tomato Guru

379 Posts

Posted - Nov 20 2007 :  06:48:09 AM  Show Profile  Reply with Quote
Don't forget about this one ;)
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18948 Posts

Posted - Nov 20 2007 :  08:24:07 AM  Show Profile  Reply with Quote
It is still in the list

Unfortunately so are quite a lot of other items.

zen is the art of being at one with the two'ness
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