I want to make a change to an UI element and for example change a text label, however I get a segfault instead.
var text = new TextLabel("Hello Tizen NUI World")
{
HorizontalAlignment = HorizontalAlignment.Center,
VerticalAlignment = VerticalAlignment.Center,
TextColor = Color.Blue,
PointSize = 12.0f,
HeightResizePolicy = ResizePolicyType.FillToParent,
WidthResizePolicy = ResizePolicyType.FillToParent
};
window.Add(text);
int i = 1;
new System.Threading.Timer((r) => {
text.Text = $"Text {i}"; // <--THIS generates the segfault
i++;
}, null, TimeSpan.Zero, TimeSpan.FromSeconds(5));
Why do I get that segfault and are there other ways to dynamically change text or any other propriety dinamically ?
PS: Instead of this timer, imagine that maybe I have an async web request and instead of a stupid text label imagine that I need to add dynamically items to a list.
Dynamic change a text label
Hi,
I want to make a change to an UI element and for example change a text label, however I get a segfault instead.
Why do I get that segfault and are there other ways to dynamically change text or any other propriety dinamically ?
PS: Instead of this timer, imagine that maybe I have an async web request and instead of a stupid text label imagine that I need to add dynamically items to a list.
BY
16 Apr 2025
Tizen Studio
BY
04 Nov 2024
Tizen Studio
BY
02 Apr 2024
Tizen Studio