Re: gtk_entry question (example from faq)
- From: Vasiliy G Tolstov <v tolstov selfip ru>
- To: "Brian J. Tarricone" <bjt23 cornell edu>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: gtk_entry question (example from faq)
- Date: Sun, 07 Dec 2008 05:05:12 +0300
Thank You! I'm replace G_CALLBACK with (void *). All work's fine.
On Sat, 2008-12-06 at 17:20 -0800, Brian J. Tarricone wrote:
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
--
Vasiliy G Tolstov <v tolstov selfip ru>
Selfip.Ru
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]