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 » Proper SplitterFrame removal++
Re: Proper SplitterFrame removal++ [message #58402 is a reply to message #58221] Tue, 17 May 2022 15:34 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
luoganda wrote on Mon, 28 March 2022 08:51
1st question is more about c++, but anyway:
I have this struct.
struct SCtrl:Ctrl{
	void Paint(Draw& w)override{
		...
	}
};
Array<Ctrl> ctrls;
Array<SCtrl> sctrls;
ctrls.Create<Button>(); //this is ok
sctrls.Create<Button>(); //this produces error(no matching member function for call to 'Add')

Can the last one be done, so that SCtrl is somehow subclassed but still used as Ctrl to be used as Button,...?


You can only Create instances of classes that are derived from T. Button is descendant of Ctrl, but not SCtrl.

Quote:

Any idea how to do this properly? maybe provide copyCtor?


Do what? Smile

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [FEATURE] Common horizontal scroll on Shift+mouse wheel
Next Topic: How would I virtualize a scrollable view to dynamically load Ctrls?
Goto Forum:
  


Current Time: Sat Apr 27 06:10:12 CEST 2024

Total time taken to generate the page: 0.04889 seconds