Msgbox_get_title and msgbox_get_text returning the same pointer

Description

Hi there, I am having trouble using the message box in lvgl.

The API calls for getting the title and content labels are both returning the same pointer.

What MCU/Processor/Board and compiler are you using?

STM32F769 on a custom boards. STM32 CubeIDE.

What LVGL version are you using?

master (latest)

What do you want to achieve?

I am trying to set the text for my message box labels (both the title and the content)

What have you tried so far?

I tried setting the label text by first getting the label object, and then setting the text with lv_label_set_text.

At this stage my messagebox title is being updated twice.

Something I noticed:

When calling the lv_msgbox_get_text, the call to lv_obj_get_child does not take the program to that function, rather, lv_obj_get_child_cnt is called.

Code to reproduce

		lv_obj_t * lv_messageBoxtemp = lv_msgbox_create(NULL, "Welcome to my message box", "Any important information will be displayed here", NULL, false);

		lv_obj_t * title = lv_msgbox_get_title(lv_messageBoxtemp);
		lv_obj_t * content = lv_msgbox_get_text(lv_messageBoxtemp);
		lv_label_set_text(title, "Change title to this");
		lv_label_set_text(content, "Change content to this.");

It’s a bug due to fragile implementation based on number of child objects & construction order. The implementation only works if you add a button to your message box. Submit a bug report under issues on github.

Thank you! I was scared of assuming a bug, but that does explain it.