Re: gtktext.c / invalid cast from `GtkWindow' to `GtkText'



Hello,

On Fri, 2001-10-26 at 10:07, Guilhem Tardy wrote:
Hi guys,
I made a modification to a GTK app, and got many of those warnings (at
initialization only):

Gtk-WARNING **: invalid cast from `GtkWindow' to `GtkText'

Gtk-CRITICAL **: file gtktext.c: line 954 (gtk_text_insert): assertion
`GTK_IS_TEXT (text)' failed.

Do you have any idea what's going on?

Somewhere in the code, you are using something of type GtkWindow, when
it should be (or is expected to be) of type GtkText.  Since the
inheritence tree is:

  GtkObject
   |
   +- GtkWidget
       |
       +- GtkContainer
       |   |
       |   +- GtkBin
       |       |
       |       +- GtkWindow     <--- There's GtkWindow
       |
       +- GtkEditable
           |
           +- GtkText           <--- There's GtkText


... you cannot change one into the other.  (This is Object Oriented
stuff... I'm not sure if you are familiar with this type of stuff or
not, but if you aren't say so, and I'll point you to some reference
materials to help you out.)

Another result is that at exit the app
crashes.

I'm not sure why that is.

I am new to GTK, and would appreciate any comment/advice about this.
Obviously the error is in the app, but the warning at run-time doesn't help me
much with finding the bug in my code.

Did you change what one of the GTK+ Widgets was?  Maybe that was the
problem?


Hope that helps a bit.

See ya

     Charles Iliya Krempeaux
     tnt @ linux.ca
     ckrempea @ alumni.sfu.ca




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