On Tue, Jul 31, 2012 at 9:44 AM, Eunmi Lee <myy...@gmail.com> wrote: > Vincent and Gustavo, thank you for reply. > > But I could not find the answer from emotion and elementary, > because I want to make the Evas_Object which is inheritable and gets > value from the constructor's parameter. > > Elementary gets the parent as a parameter in the constructor, but > elementary widget is not inheritable, so they can do everything in the > constructor. > Let's imagine to make the elm_popup inheritable. where can we make the > Widget_Data and how can we pass the parent to make the wd->notify? > > If I don't have to make my Evas_Object inheritable, I can do > everything in the constructor like an Elementary and Emotion widget. > If I don't have to pass the value which is used to initialize > Evas_Object, it is easy to make it. > However, I want to do both of them. > > I really want to find the way to get the both of inheritance and value > of constructor.
Gustavo Lima replied with pointers on how to do it. But I insist you're looking it from the wrong point of view. There is no constructor parameter concepts for Evas_Object. period, accept that. The proper way to do it is to have another method call AFTER the constructor: Evas_Object *o = evas_object_smart_add(e, my_smart); my_property_set(o, my_parameter); You can expose this in two forms: 1. Wrapped inside your own constructor (not-EFL like): Evas_Object *my_obj_add(Evas *e, my_type my_parameter) { Evas_Object *o = evas_object_smart_add(e, my_smart); my_property_set(o, my_parameter); return o; } 2. Explicitly expose a constructor without parameter and a public (EAPI) method. For other details look at glima's email. -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: barbi...@gmail.com 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-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel