- ScottFromDerby
- Posts: 9
- Joined:
UIInlineContainers
Hey, we're trying to mix Run and InlineUIContainers using a TextBlock's InlineCollection. We would like to reuse the InlineCollection every 5 seconds or so, clear it and add some more contents (basically mix-media loading screen tips). However when we clear the TextBlock's InlineCollection, we get an internal Noesis assert (vector.h, @778) due to mInlineInfo being empty, and mInlineContainers containing an index reference into it (TextBlock.cpp@922).
This should be a minimum repro (semi pseudocode):
Any help appreciated, thanks!
This should be a minimum repro (semi pseudocode):
Code: Select all
OnUpdate( float fDt )
{
static float fTimePassed = 0.0f; fTimePassed += fDt;
if( fTimePassed >= 5.0f )
{
fTimePassed = 0.0f;
Noesis::TextBlock* pTextBlock = FindName<Noesis::TextBlock*>();
Noesis::InlineCollection* pInlines = pTextBlock->GetInlines();
pInlines->Clear(); // assert/run here on *second* run
pInlines->Add(Noesis::MakePtr<Noesis::Run>("Press "));
Noesis::Ptr<Noesis::Button> pBtn = Noesis::MakePtr<Noesis::Button>();
pInlines->Add(Noesis::MakePtr<Noesis::InlineUIContainer>(pBtn));
pInlines->Add(Noesis::MakePtr<Noesis::Run>(" to jump"));
}
-
sfernandez
Site Admin
- Posts: 2991
- Joined:
Re: UIInlineContainers
Hi, which version of Noesis are you using?
Because we recently fixed for 2.2.4 a bug that seems exactly the same scenario that you are explaining: #1542
Because we recently fixed for 2.2.4 a bug that seems exactly the same scenario that you are explaining: #1542
- ScottFromDerby
- Posts: 9
- Joined:
Re: UIInlineContainers
Hey! Thanks for the fast reply!
We're still using 2.2.1, looks like the fix will be in 2.2.4 onwards - will talk to the engine team to see if we can take 2.2.4.
Really appreciate that!
Thanks
Scott
We're still using 2.2.1, looks like the fix will be in 2.2.4 onwards - will talk to the engine team to see if we can take 2.2.4.
Really appreciate that!
Thanks
Scott
Re: UIInlineContainers
Yes please, try the latest version (2.2.5 right now) and reopen this thread in case you still have the issue.