Using… lv_micropython master is v9
line 124, in task_handler
File “”, line 15, in event_cb
AttributeError: no such attribute
get_active_button_text() is in the docs
Using… lv_micropython master is v9
line 124, in task_handler
File “”, line 15, in event_cb
AttributeError: no such attribute
get_active_button_text() is in the docs
I tried on the simulator you sent, and the error was the same as yours.
In the official document’s Event introduction, there is a description:
In the event handler, lv_event_get_target(e) will return the button matrix and lv_event_get_current_target(e) will return the message box. lv_msgbox_get_active_btn(msgbox) and lv_msgbox_get_active_btn_text(msgbox) can be used to get the index and text of the clicked button.
Therefore, I made modifications to the event_cb method.
def event_cb(e):
mbox = e.get_current_target_obj()
print("Button %s clicked" % mbox.get_active_btn_text())
Then it can run normally.
Thank you that did the trick !!!
By the way that simulators is from the docs examples and should be updated.