Oh man, get a shorter example?! :-) Find some replies below:
On Thu, Aug 23, 2012 at 9:38 AM, maxim <[email protected]> wrote: > Hello. I've the following question: > > Let's imagine, that we have .edc file with EXTERNAL elm widjets, i.e.: > > ... Ecore_Evas* ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 0, 0); > you should be using elm_win if you want elementary externals. It may work otherwise, but it's better to create elm_win to get elementary parenting right. Evas_Object* edje = edje_object_add(canvas); > edje_object_file_set(edje, "panes_lists_test.edj", "other"); > evas_object_move(edje, 0, 0); > Evas_Coord edje_width, edje_height; > edje_object_size_min_get(edje, &edje_width, &edje_height); > evas_object_resize(edje, edje_width, edje_height); > evas_object_show(edje); > > ecore_evas_resize(ee, edje_width, edje_height); > ecore_evas_show(ee); > > // API > /* switch edje with group ("gr_list_users") */ > edje_object_file_set(edje, "panes_lists_test.edj", "gr_list_users"); > Do you understand that at this point you just reset the edje to "gr_list_users" group right? All the other code ("other") is flushed/ignored. > Evas_Object* userlist = > edje_object_part_external_object_get(edje, "userlist"); > Evas_Object* host_icon = elm_icon_add(edje); > elm_icon_standard_set(host_icon, "home"); > elm_image_resizable_set(host_icon, EINA_FALSE, EINA_FALSE); > elm_list_item_append(userlist, > "Just a Label of List", > host_icon, > NULL, > NULL, > NULL); > > /* swith edje with group ("gr_list_chat") */ > edje_object_file_set(edje, "panes_lists_test.edj", "other"); > and here again, you just flushed everything, including your userlist you got before. It's all deleted when you "edje_object_file_set()". > The problem is following: > > It compiles correctly, but if we run this program, we'll see the PANES (elm > widget) and borders of both LISTs (elm widget), BUT we won't see an > appended > list element! how can we fix it? > You stop doing edje_object_file_set(). > I've tried to develop simple .edc with one background and list in the same > group > and append a list element in simple .c API file, similar to the above, but > it > does not work again (. > Maybe send that one instead? Your test case is overly complex and largely wrong. > > The question is: how to interact with Elementary widgets, declared in > .edc? How > to fix this problem and make elm/list to append new item correctly, that > is we > would see it? > Like you did, you get the external object. This is useful for complex widgets such as list. For just setting some attributes, like button label, it's better to use the "param_set" interface of externals. Another question is: I've tried to declare BOX part in .edc and then in API > .c > code, I've tried to use edje_object_part_box_append(edje, "box name", > list), > where 'list' is an Evas_Object* list = elm_list_add(...). Where should I > add > this list (what is the parent)? I tried to make elm_win in the same program > along with Evas* canvas (edje is rendered on canvas), but I still can not > see > the list at all. > Box won't show its children automatically. Did you evas_object_show(list)? Why my list appending does not work? Seems, that I extract elm_list > correctly > from .edj and try to append. Why it does not work? See above :-) -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: [email protected] Skype: gsbarbieri Mobile: +55 (19) 9225-2202 ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ enlightenment-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-users
