Re: windows not send widget to callback

I believe that I found the problem, but I don't have a solution :( !

I made the interface using glade-2 and I add in field "Object" my 
struct (a structure that I use in my program, not any struct from Gtk)
that has the information about these window (key pressed, info about
buttons, max buttons in these window, function called by these buttons, 
etc) and these field "Object" have to be some widget, I was using the 
concept of glade 0.6.4 that we can send any data to callback.

Well, I attemp to use my internal structures as global variables but someone have
a better way to do this ?

Thanks for all help

On Thu, 18 Sep 2003 17:39:09 -0300
Flavio Alberto Lopes Soares <flavio maqplas com br> wrote:

> Hello all,
> 	I'm creating an application that uses GTK2 and your interface 
> is made using Glade 2, I attached in each window a signal
> key_press_event and in your callback I read in parameter 
> *widget what window emitted this signal, but the
> *widget is allways NULL, and I can't identify what is the window
> that user is pressing.
> I have these messages when I run my program
> (granmmi:1328): Gtk-CRITICAL **: file gtkwidget.c: line 3614 (gtk_widget_get_name): assertion `GTK_IS_WIDGET (widget)' failed
> (granmmi:1328): Gtk-CRITICAL **: file gtkwidget.c: line 3400 (gtk_widget_grab_focus): assertion `GTK_IS_WIDGET (widget)' failed
> ** ERROR **: file keyboard.c: line 44 (move_screen_button): assertion failed: (widget != NULL)
> aborting...
> Abortado
> The windows are Toplevel (I will remove the WM decorations with gtk_window_set_decorated but now they are presents)
> What it lacks to windows send your widget ?
> Thanks for all help

Flavio Alberto Lopes Soares
flavio maqplas com br

MAQPLAS Indústria e Comércio de Máquinas LTDA.

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