Re: Calling $widget->destroy

Matt Brei <mattbrei gmail com> writes:

If I call destroy on a vbox or other container, does it also destroy all
child widgets?  From what I can tell in the docs it does,

I think so.

but it doesn't
look like gtk2-perl has an equivalent to gtk_widget_destroyed() in order to
verify this.

You can connect your own handler to the destroy signal and do whatever
things, set a flag, zap a variable, destroy something associated.

It's often friendlier to use weak refs than rely on a destroy to clean
things up, though sometimes there's unavoidable circular refs, even in
gtk itself, which have to be broken by a destroy.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]