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   |
Oblivion
Messages: 1206 Registered: August 2007
|
Senior Contributor |
|
|
Hello,
That was a missing information. Next time try to be a little more specific. 
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
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Wed, 09 August 2017 15:39] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Tue May 13 23:16:54 CEST 2025
Total time taken to generate the page: 0.01259 seconds
|