Author |
Topic  |
|
znakeeye
Tomato Guru
    
379 Posts |
Posted - Sep 08 2006 : 3:07:06 PM
|
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
19179 Posts |
Posted - Sep 09 2006 : 09:53:14 AM
|
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 |
 |
|
jpizzi
Tomato Guru
    
USA
642 Posts |
Posted - Sep 09 2006 : 6:16:43 PM
|
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 |
 |
|
schoenherr
Tomato Guru
    
Germany
160 Posts |
Posted - Sep 11 2006 : 01:03:16 AM
|
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]) |
 |
|
feline
Whole Tomato Software
    
United Kingdom
19179 Posts |
Posted - Sep 16 2006 : 3:19:53 PM
|
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 |
 |
|
znakeeye
Tomato Guru
    
379 Posts |
Posted - Nov 20 2007 : 06:48:09 AM
|
Don't forget about this one ;) |
 |
|
feline
Whole Tomato Software
    
United Kingdom
19179 Posts |
Posted - Nov 20 2007 : 08:24:07 AM
|
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 |
 |
|
|
Topic  |
|