Re: Can't get Callback to Work [Not yet solved]
- Posted by Icy_Viking 6 days ago
- 77 views
petelomax said...
Have you tried call_back({'+',click_id})?
I just tried and it does not work.
include std/ffi.e include evas.e include elemantary.e constant TRUE = 1, FALSE = 0 function on_click() elm_exit() return TRUE end function elm_init(NULL,NULL) elm_policy_set(ELM_POLICY_QUIT,ELM_POLICY_EXIT) atom win = elm_win_util_standard_add("Main","Hello World") elm_win_autodel_set(win,TRUE) evas_object_resize(win,640,480) atom click_id = routine_id("on_click") if click_id = -1 then puts(1,"routine_id is not valid!\n") end if atom click_cb = call_back({'+',click_id}) --still not working atom btn = elm_button_add(win) elm_object_part_text_set(btn,NULL,"EXIT") evas_object_smart_callback_add(btn,"click",click_cb,NULL) --maybe issue is here? evas_object_move(btn,60,15) evas_object_resize(btn,120,30) evas_object_show(btn) evas_object_show(win) elm_run()