[gtk-list] Re: GTK-- question (newbie)



Hi,  I believe the problem was with the way I was connecting menu items
to callbacks, I've just installed gcc2.8.1 and gtk--0.9.5, and looked
through the testgtkmm example, and did it the same as the example and it
works, yayyy.

BTW, I can't seem to send mail to this list from netscape4.04 in linux,
but it works fine from netscape4.04 in win95, which is a real pain,
because I'm using win95 less and less in favor of linux.  Has anyone
else had these problems?  I get mail from the list, just can't mail to
it...

thanks,
Tom

Tom Fishwick <tfishwick@coastnet.com> writes:
>         I'm using Gtk-- (on linux), and am trying to insert text into
> 'Gtk_Text'.  I've connected Gtk_Text::changed() to a method that inserts
> some text, and it works fine.  But when I tried doing this
> 'MyGtkText.insert(0, 0, 0, "gg", 2)' inside a method thats connected to
> Gtk_FileSelection.ok_button.pressed then it gives me
> 
> ** WARNING **: invalid class type `(unknown)' in cast to `GtkText'
> 
> ** WARNING **: file gtktext.c: line 694 (gtk_text_insert): "GTK_IS_TEXT
> (text)" 

This means the object passed to gtk is not a GtkText. Under gtk--, this
kind of errors should not happen. Can you give a small example code
which
shows this problem? (I dont know how it would be any way different if
one
does it inside a callback, shouldnt be..)

> What does this mean?  I have to somehow cast the object?  Or put the
> widget in focus?

Nope, the error happened inside a cast which gtk checks.

Looks like a bug in gtk-- to me, but cant be sure without more
information...
(I think I should look into Gtk_Text more later today...)

-- 
-- Tero Pulkkinen -- terop@modeemi.cs.tut.fi --



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