Re: [gtk-list] gtk-- problem :(
- From: Tero Pulkkinen <terop students cc tut fi>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] gtk-- problem :(
- Date: 12 Apr 1998 19:29:58 +0300
Ronald Lembcke <es186@fen.baynet.de> writes:
> I hope this is the right place to ask (or does a gtk-- mailinglist exist?
> than I'd ask there ... but didn't notice one till now...)
>
> Ok... I just want a CList in a window with a few other widgets...
>
> But it produces the following error, and I have no idea where it
> comes from... :(
This is known bug in CList constructor. (its even in release notes of
latest version of gtk-- and is fixed in next release).
workarounds are:
1) change gtk--.cc CList constructor so that the _construct() method is
called before initilaization of the scrollbars.(you need to use operator, to
do this, because they are in constructor initialization lists) Rebuild gtk--.
here's the constructor code:
Gtk_CList::Gtk_CList(int columns, gchar *titles[])
: Gtk_Container(GTK_CONTAINER(gtk_type_new(c_class.get_type()))),
// Note, gtk_clist_construct must be done before the vscrollbar and
// hscrollbar is accessed, thus I use the ,-operator to enforce order.
// this code also depends on C++'s feature that construction of members
// is done in correct order.
vscrollbar((gtk_clist_construct(GTK_CLIST(gtkobject), columns, titles),
GTK_VSCROLLBAR(GTK_CLIST(gtkobject)->vscrollbar))),
hscrollbar(GTK_HSCROLLBAR(GTK_CLIST(gtkobject)->hscrollbar)),
select_row("select_row", this),
unselect_row("unselect_row", this),
click_column("click_column", this)
{
}
or
2) create the clist with C function gtk_clist_new() and then create the wrapper
using different constructor (Gtk_Clist::Gtk_Clist(GtkCList *o)).
--
-- Tero Pulkkinen -- terop@modeemi.cs.tut.fi --
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]