Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Overriding Display methods too complicated due to high amount of arguments (Making Display class easier to use)
Re: Overriding Display methods too complicated due to high amount of arguments [message #55468 is a reply to message #55215] |
Sat, 14 November 2020 10:02   |
 |
mirek
Messages: 14258 Registered: November 2005
|
Ultimate Member |
|
|
The rule is absolutely correct (for once , but you should not be slave to it. It is not the whole story.
If you want one example where this does apply and where changing the code would be appropriate, check EncodeHtml.
With Display, there are some mitigating factors
- the function is rarely called by client code
- the parameter types are well different, which is very important, it greatly reduces the chance of error. It is one thing to have
Foo(int bar, int quo, int boo, int hoo, int woo) and Foo(Font bar, String quo, Color boo, int *hoo, Image wpp).
- it is just 2 more parameters over 4...
Most importantly, U++ rule number one is:
NEVER EVER OVERENGINEER THE STUFF!
Adding one class and 6 methods just to fix nothing? Are you paid by line written or what?
Mirek
|
|
|
 |
|
Overriding Display methods too complicated due to high amount of arguments
By: Klugier on Sun, 18 October 2020 00:01
|
 |
|
Re: Overriding Display methods too complicated due to high amount of arguments
By: Oblivion on Sun, 18 October 2020 19:16
|
 |
|
Re: Overriding Display methods too complicated due to high amount of arguments
By: mirek on Mon, 19 October 2020 15:59
|
 |
|
Re: Overriding Display methods too complicated due to high amount of arguments
By: Oblivion on Mon, 19 October 2020 16:53
|
 |
|
Re: Overriding Display methods too complicated due to high amount of arguments
By: mirek on Sat, 14 November 2020 10:02
|
 |
|
Re: Overriding Display methods too complicated due to high amount of arguments
By: Oblivion on Sat, 14 November 2020 10:14
|
 |
|
Re: Overriding Display methods too complicated due to high amount of arguments
By: Klugier on Sat, 14 November 2020 14:23
|
 |
|
Re: Overriding Display methods too complicated due to high amount of arguments
By: mirek on Sat, 14 November 2020 14:33
|
 |
|
Re: Overriding Display methods too complicated due to high amount of arguments
By: mirek on Sat, 14 November 2020 14:38
|
 |
|
Re: Overriding Display methods too complicated due to high amount of arguments
By: Klugier on Sat, 14 November 2020 20:29
|
 |
|
Re: Overriding Display methods too complicated due to high amount of arguments
By: mirek on Sun, 15 November 2020 00:03
|
Goto Forum:
Current Time: Wed May 14 00:08:10 CEST 2025
Total time taken to generate the page: 0.00930 seconds
|