Re: gtk_entry question (example from faq)
- From: "Brian J. Tarricone" <bjt23 cornell edu>
- To: gtk-app-devel-list gnome org
- Subject: Re: gtk_entry question (example from faq)
- Date: Sat, 6 Dec 2008 17:20:07 -0800
On Sun, 07 Dec 2008 04:06:55 +0300 Vasiliy G Tolstov wrote:
I'm try to use exmaple from faq
http://library.gnome.org/devel/gtk-faq/stable/x842.html
But then i'm try to compile - i see this error...
How can i add to entry ability to insert only digits?
window.cpp:214: error: invalid conversion from âvoid (*)()â to âvoid*â
window.cpp:214: error: initializing argument 6 of âguint
g_signal_handlers_block_matched(void*, GSignalMatchType, guint,
GQuark, GClosure*, void*, void*)â
window.cpp:218: error: invalid conversion from âvoid (*)()â to âvoid*â
window.cpp:218: error: initializing argument 6 of âguint
g_signal_handlers_unblock_matched(void*, GSignalMatchType, guint,
GQuark, GClosure*, void*, void*)â
Well, you're compiling it as a C++ program, not a C program. C++ is
more strict about type-checking in parameters passed to functions.
Unless there's a reason you're using C++, rename the file to .c and
compile with a C compiler.
Otherwise, you'll have to add extra casts for the function pointers
passed to the functions noted in the error message.
(In all fairness, though, g_signal_handlers_unblock_matched() should
take a GCallback as the 6th param, not a gpointer. C just doesn't
care, while C++ does.)
-brian
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]