U++ framework
Do not panic. Ask here before giving up.

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 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
The rule is absolutely correct (for once Smile, 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
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to use multi-tab control?
Next Topic: Can I make round form
Goto Forum:
  


Current Time: Sat May 16 03:16:30 GMT+2 2026

Total time taken to generate the page: 0.00754 seconds