Description
I want to save the text of a text area object in my application, so I decided to do this in its LV_EVENT_DELETE
event. but I got hard fault. I think it’s because of that the childeran of ta
is deleted by then and so we can not get its text. what do you think? Is there any better solution?
What MCU/Processor/Board and compiler are you using?
STM32F429, CubeIDE, GCC
What do you want to achieve?
get the text of a text area in its delete event.
What have you tried so far?
This is the callback of ta_first_name
which caused to a hard fault.
static void ta_first_name_callback(lv_obj_t *obj, lv_event_t event)
{
(void) obj; /*unused*/
if(event == LV_EVENT_DELETE) {
char *str_first_name = lv_ta_get_text(obj);
set_first_name(str_first_name);
}
}