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++ Core » Array problems
Re: Array problems [message #48622 is a reply to message #48620] Wed, 09 August 2017 15:18 Go to previous messageGo to previous message
Oblivion is currently offline  Oblivion
Messages: 1093
Registered: August 2007
Senior Contributor
Hello,

That was a missing information. Next time try to be a little more specific. Smile

Anyway, here you go:

TestWindow::TestWindow()
{	
        // Array<ParentCtrl> layoutArray;
        // Note that we're using static_cast here, for the sake of simplicity. When you have several layouts in same array, using One<>, which has RTTI support, or dynamic_cast would be better.

	auto& t = layoutArray.Add(new WithTestLayout<ParentCtrl>); // <-- Array "owns" the new ParentCtrl with layout. No need to delete explicitly.
	CtrlLayout(static_cast<WithTestLayout<ParentCtrl>&>(t));
        Add(t.SizePos()); 
	
}


I hope this will help.

Best regards,
Oblivion


[Updated on: Wed, 09 August 2017 15:39]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Is there a U++ function to copy a String contents to the clipboard
Next Topic: Missing ArrayIndex and AIndex
Goto Forum:
  


Current Time: Sun May 05 05:58:17 CEST 2024

Total time taken to generate the page: 0.02845 seconds