ListView dynamic update
Friends! Tell me why, when you try to update the text in the list, an error occurs . I created a project on github. https://github.com/Luummii/listunreal
I guess I don't know anything. Really need help.
After starting the project, there will be a button on the screen. When you click on the button, a list with the text in each line should appear. The text is put in C++.
But instead, a list with the initial text set to BP appears and an error falls out.
I tried to understand and it turns out that the list item is not created at the time of installation of the text. But for what reason remains a mystery to me.
Look please, if not difficult, where there is a mistake.
Error occurs when calling the method void UListComponent_CPP::SetActionName(FString TaskName)
and it happens because there is ensureMsgf(...). But if you disable ensureMsgf, the Studio falls.
It crashes because the TextBlock_ActionName pointer is undefined. And very strange!!! For me:)
If the method implementation void UListComponent_CPP::SetActionName(FString TaskName)
move to the constructor - set the text in the constructor, then there is no error and everything works well.
Please explain where am I wrong?
Follow this question
Once you sign in you will be able to subscribe for any updates here