[Glade-users] globals vs locals... again

"James K. Wiggs" wrote:
The names assigned to the various widgets in these sub-GUIs are
generated automatically when they are created, but it would be possible
for duplicate names to be created.  If this is the case, what will
lookup_widget() do?

It will return the latest created widget with the name you specify, I

See support.c, function lookup_widget(), and the code in interface.c
which performs gtk_object_set_data() calls for each widget created.  The
function works by associating a named piece of data with the toplevel
widget.  The name is the widget being created.

I recall one Motif interface builder made by Digital that refused to let
you have a widget name that was duplicated.  The tool itself took care
of making sure it was unique.  It even went so far as to change all the
widget names when you pasted a copy of the widget tree somewhere else. 
Painful.  I don't think it is enough of a problem to require Glade to do

James Cameron                                      (cameron stl dec com)

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