Dear Gustavo Sverzut and Gustavo Lima,

I'm really grateful for your helps :) and it is great that I can
inherit Elementary widgets later!
I'm going to prepare new patch to expose new API to set property after
creating my Evas_Object by referencing the Elementary widgets.

Actually, it is similar with my first approach to make my Evas_Object
inheritable with property.
But at that time, I doubted that it is right approach because the
Evas_Object which inherits my Evas_Object has to be sure to call API
to set property in its constructor.
So, I wanted to find the way that the Evas_Object which inherits my
Evas_Object can not forget to do additional work to set property, and
I failed.
Anyway, now I'm happy because I've got the way which is acceptable and
accredited in the EFL :)
I want to say thank you again.

Additionally someday, I hope that Evas_Object can support additional
parameters in the evas_object_smart_add().
In the GTK, they can set properties to the g_object_new() function and
the properties are saved as g_property.
so, the properties can be used later such as g_object's constructed() function.
I don't know well how GTK works, but I envy that functions.

BR,
Eunmi Lee

2012/8/1 Gustavo Sverzut Barbieri <[email protected]>:
> On Tue, Jul 31, 2012 at 11:34 AM, Gustavo Lima Chaves
> <[email protected]> wrote:
>> * Gustavo Sverzut Barbieri <[email protected]> [2012-07-31 11:28:49 
>> -0300]:
>>
>>> On Tue, Jul 31, 2012 at 9:44 AM, Eunmi Lee <[email protected]> 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.
>>
>> Barbieri, I bet what he wants is setting the object's smart data
>> *inside its smart_add() function*.  That's the place to do it.
>
> this part is already covered by your email :-)
>
> --
> 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-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to