* Eunmi Lee <myy...@gmail.com> [2012-07-31 21:44:44 +0900]:

> 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?

Please, you just looked at one of the few remaining legacy widgets
inside Elementary. Take a look at
http://glima.wordpress.com/2012/06/11/new-widgets-hierarchy-on-elementary/
and you see that I'm exactly working on fixing the non-inheritance
issue inside Elementary, which is almost complete. The library is
close to a new release, so please look at SVN, live, code.

>
> 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.

The recommended way of doing inheritance, as you will find in Evas'
documentation and examples
(http://docs.enlightenment.org/auto/evas/evas-smart-object_8c-example.html),
is by means of the EVAS_SMART_SUBCLASS_NEW and EVAS_SMART_DATA_ALLOC
macros, which are extensively used throught Elementary.

Regards,

>
> BR,
> Eunmi Lee
>
> 2012/7/31 Gustavo Sverzut Barbieri <barbi...@profusion.mobi>:
> > On Tuesday, July 31, 2012, Eunmi Lee wrote:
> >
> >> Hello, EFL folks,
> >> I have a problem during making the Evas_Object, so I really need your help.
> >>
> >> What I want to do is to create Evas_Object with specific data.
> >> That means, I need to pass data which is used in the
> >> Evas_Smart_Class's add function.
> >>
> >> I'm using "evas_object_smart_add()" to create Evas_Object, but it can
> >> not accept the values except Evas and Evas_Smart.
> >> So, I've tried to pass data using Smart_Class's data field, but I failed.
> >> Because I can not find the way to free the allocated Smart_Class after
> >> I create Smart_Class and allocate memory for that instead using
> >> "static" keyword. and I don't know it is right way to not create
> >> Smart_Class without "static" keyword.
> >>
> >> I've tried to find the example which creates the Evas_Object with
> >> specific data, but I could not find.
> >> So, Would you tell me the way to pass the data when creating the
> >> Evas_Object?
> >>
> >> Below URL is my patch to do above things.
> >> https://bugs.webkit.org/show_<https://bugs.webkit.org/show_bug.cgi?id=90054>
> >> bug.cgi?id=90054 <https://bugs.webkit.org/show_bug.cgi?id=90054>
> >
> >
> > It is wrong and you should never, ever, try to do it. It's upside down
> > thinking. Change your usage and set it after evas_object_smart_add()
> > returns.
> >
> > See elementary. It's constructors are elm_CLASS_add(Evas_Object *parent),
> > it calls smart add and then sets the parent
> >
> >
> >
> >> BR,
> >> Eunmi Lee
> >>
> >>
> >> ------------------------------------------------------------------------------
> >> 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 <javascript:;>
> >> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >>
> >
> >
> > --
> > 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
>
> ------------------------------------------------------------------------------
> 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

--
Gustavo Lima Chaves
Computer Engineer @ ProFUSION Embedded Systems

------------------------------------------------------------------------------
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

Reply via email to