Re: How can I check if a GtkWidget exists?



On Fri, Jul 20, 2012 at 12:50:45AM -0600, Frank Cox wrote:
How can I check if a GtkWidget exists?

By keeping track of it (either when you create and destroy the widgets
or using weak references/weak pointers/destroy callbacks/...).

âChecking the existence of a widgetâ is, essentially, a meaningless
phrase.  If the widget has been destroyed you do not have any means to
*refer* to it.  You cannot ask âdoes this widget existâ because there is
no way to say âthis widgetâ.

Using the pointer to the memory the widget used to occupy for anything
is a programming error.

Yeti




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