Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 #55483 is a reply to message #55481] Sun, 15 November 2020 00:03 Go to previous message
mirek is currently offline  mirek
Messages: 14267
Registered: November 2005
Ultimate Member
Klugier wrote on Sat, 14 November 2020 20:29
Hello Mirek,

I am happy we are on the same page. I didn't know that this additional parameters were added in the past.



Please do not mix HtmlEncode and Display. First one is bad and to be fixed, second one is OK.

Quote:

To be clear my main reason in this discussion is to make U++ API the most pleasant to use as possible. This is not about criticizing some past decisions. We are all here together and we would like to help and make U++ even better.


HtmlEncode is sort of past decision. Will be fixed in time. Display::Paint I would do the same no matter what.

BTW, if you read what they suggest really carefully, I think that the good indicator for change is this:

Are you using the newly created object just to fix single method, or there are more cases where this would be usable?

Does not apply always, HtmlEncode is counterargument of sorts, but really does apply to Display::Paint. Intruducing redundant object there just to satisfy the idea that function cannot have more than 4 parameters would really make me sick. Literally Smile It would be really bad code smell for me.

Mirek

[Updated on: Sun, 15 November 2020 00:03]

Report message to a moderator

 
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: Wed Aug 27 07:12:45 CEST 2025

Total time taken to generate the page: 0.00726 seconds