On Fri, Jul 17, 2009 at 6:13 AM, Andreas Volz<li...@brachttal.net> wrote:
> Hello,
>
> while wrapping Elementary to C++ I have this problem:
>
> How could I find out in the parent container widget that a child widget
> has been added or removed. I tried the "sub-object-add" and
> "sub-object-del" callback, but it's not what I want as it calls this
> signal more often than when I add/del an object to a container. Maybe
> the member_add and member_del callbacks in ESMART are what I need, but
> they're not used in Elementary. Any other ideas?

member_add() should be called on children, at least that's what I
remember... if not I guess is missing as one object should contain the
children (given the container member).

anyway, I wish I had time to merge guarana and elementary as guarana
way of creating widgets makes things much easier for bindings and all.


> I tried to suicide my C++ object if the C object deletes itself and
> throws the delete signal, but that's a very bad design. It's the job
> of the container to destroy the widgets.

this is the way to go. Each shell/wrapper object should listen to
EVAS_CALLBACK_DEL and EVAS_CALLBACK_FREE (pre/post memory being
deleted) and either delete itself or make it shallow (make the now
dead wrapped pointer NULL).

-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN: barbi...@gmail.com
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to