RE: problem with gtk_signal_func and gtkentry() in gtk1.2



That error usually means that the function
"gtk_entry_get_text(GTK_ENTRY(edit_to))..." returns a void value therefore
would not be useful, but you are probably trying to use it in someway? That
doesnt make sence seeings as gtk_entry_get_text returns a gchar*.  Therefor
I suspect it is because you are calling some function (with the snippet
above as part of that call) and that is the end of the line that the error
reports about.  All the same, it's usually because a function returns void
and doesnt expect the result to be used and you are using it.

Regards,

Martyn

-----Original Message-----
From: Marcus vA [mailto:mva121 gmx net]
Sent: Friday, May 10, 2002 10:08 AM
To: gtk-app-devel-list gnome org
Subject: problem with gtk_signal_func and gtkentry() in gtk1.2


Hello, 

I've a big problem with a GTK_SIGNAL_FUNC
and GtkEntry(). The main problem to solve, was to let the user make 
some input in two entry-boxes and write this in a file.

<snippet>
gnome_dialog_button_connect(GNOME_DIALOG(editor),
                                                            0,
        
GTK_SIGNAL_FUNC(add_entry_cb(
        
lang_from,
        
lang_to,
        
gtk_entry_get_text(GTK_ENTRY(edit_from)),
        
gtk_entry_get_text(GTK_ENTRY(edit_to)))),
                                                              NULL);

</snippet>

here comes the add_entry_cb:

void add_entry_cb(gchar *trans_from_lng, gchar *trans_to_lang,
                  gchar *edit_from_lng, gchar *edit_to_lng){
<....>
}

All headers and Makefiles are correct, all headers, which are necessary, are
included.

when I try to compile this, the following error occurs:

121: void value not ignored as it ought to be

line 121 is 
   gtk_entry_get_text(GTK_ENTRY(edit_to)))),

Does anyone know how to get this fixed?
I'm new to gtk, so any help or suggestions are wanted.

Thanks 

Marcus
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



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