Re: subclassing GtkText
- From: Thomas Mailund <mailund mail1 stofanet dk>
- To: gtk-list gnome org
- Subject: Re: subclassing GtkText
- Date: 28 Jun 2000 18:56:14 +0200
>>>>> "H" == Havoc Pennington <hp@redhat.com> writes:
H> xander <xvw@warande0147.warande.uu.nl> writes:
>> If I try to subclass GtkText I get coredumps. Even if I replace
>> the calls in example tictactoe correctly (gtk_text_get_type etc.)
>> it still coredumps.
>>
H> Your program has a bug?
H> Sorry, we can't guess what it is without some information. ;-)
I'm guessing here, so ignore me if I'm wrong.
xander, you're using the tktext port and you simply subclass it. The
only initialisation happening then is the `init' function. This will
not initialize the `text_buffer->tree', since the tree is initialised
in `new'. Unfortunately, you cannot really use `new' to initialise
your subclass, and even worse, you cannot update the tree yourself
since the btree is not public.
I send a patch to gtk-devel a little back[1], that moved the
initialization to a `construct' method, but the patch has not been
applied.
/mailund
[1] You can get the patch from the mailing list archive
<URL:http://mail.gnome.org/pipermail/gtk-devel-list/2000-June/003545.html>.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]