Re: gtk-bin.c error when using frames
- From: Skip Montanaro <skip pobox com>
- To: "Dinesh Nadarajah" <dxn1972 hotmail com>
- Cc: gtk-list gnome org
- Subject: Re: gtk-bin.c error when using frames
- Date: Wed, 10 Oct 2001 09:25:24 -0500
Dinesh> // create source frame
Dinesh> frame = makeFrame();
Dinesh> gtk_container_add(GTK_CONTAINER(topLevelWindow), frame);
Try
gtk_container_add(GTK_CONTAINER(frame), topLevelWindow);
instead... Gtk is an object-oriented programming system implemented in C.
Methods are always functions that prefix the conceptual method (e.g. "add")
with the class for which the method is defined ("gtk_container" in this
case). The first argument must always be an instance of the class and
corresponds to "this" in C++ or self in languages like Python or Smalltalk.
You can think of the above call as
frame.add(topLevelWindow)
(In fact, if you where using PyGtk, that's exactly how you'd write it.)
--
Skip Montanaro (skip pobox com)
http://www.mojam.com/
http://www.musi-cal.com/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]