Re: gtk_object_set_data_full



ons, 2002-09-04 kl. 23:43 skrev drl22 cornell edu:
Two little changes, you need to cast the 4th argument, 
and gtk_object_ref returns void :-P.  Try this:

gtk_object_ref(GTK_OBJECT(tree_view));
gtk_object_set_data_full(
  GTK_OBJECT(main_window),
  "tree_view",
  GTK_OBJECT(tree_view),
  (GtkDestroyNotify)gtk_object_unref
);

That works nicely!

Thanks so much!  That's exactly what I was looking for!

Curiously, I'm experimenting with Glade after spending some time
dissecting the interface.c file it creates, I noticed that it attaches
the child widget of every parent as data using
gtk_object_set_data_full(), which is exactly what I was trying to do.

Apparently the Glade team has done this before ;-)  Many kudos to the
Glade team for a variety of things, in fact.  It's been a *really*
well-designed and easy-to-use tool for me thus far.

Thanks again,

-Collin

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Collin Starkweather              http://www.collinstarkweather.com
Consulting Software Engineer      collin starkweather colorado edu
Ph.D. Candidate     University of Colorado Department of Economics
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




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