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++ Library : Other (not classified elsewhere) » subclassing LineEdit is ugly
Re: subclassing LineEdit is ugly [message #2565 is a reply to message #2562] Tue, 18 April 2006 00:15 Go to previous message
mirek is currently offline  mirek
Messages: 14266
Registered: November 2005
Ultimate Member
hojtsy wrote on Mon, 17 April 2006 17:38


The only cost is minimal CPU overhead.



I do not care about virtual method overhead here (not a bit). But I am very concerned about fuzzy interfaces.

One problem with this approach is: where are limits?

String::Cat ?
Ctrl::HSizePos ?
DrawLabel::GetSize ?

Another problem is that introducing too much virtual methods often exposes too much of implementation details.

Now about our specific example: I see LineEdit as "blackbox" with defined (and final) operations, which has "default interface" represented by current "Key" method and default menu.

If you want more than "default interface", simply change the interface part (that one is well defined in Ctrl).

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Add and AddPick should return reference to added element
Next Topic: uvs wishes
Goto Forum:
  


Current Time: Fri Jul 18 14:29:04 CEST 2025

Total time taken to generate the page: 0.03924 seconds