Re: gtk_combo_box_get_active_text fails ???
- From: Antonio Gomes <tonikitoo gmail com>
- To: Olivier <Olivier Ramare univ-lille1 fr>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: gtk_combo_box_get_active_text fails ???
- Date: Tue, 3 May 2005 18:40:48 -0400
Hi Olivier,
first, you must to be care with the requered prototype of each signal
. In the case of changed in a gtk_combo_box context, the prototype of
the callback associated with this signal must be as following:
Signal Prototypes
"changed" void user_function (GtkComboBox *widget,
gpointer user_data);
so , try to correct it and the callback signiture to
void select(GtkComboBox *combo, gpointer unused) {...}
tell us, if it does not make any effect !
best regards
On 4/30/05, Olivier <Olivier Ramare univ-lille1 fr> wrote:
Dear all,
here is part of my code:
-------------------------------
my_combox_box = gtk_combo_box_new_text();
g_signal_connect (my_combox_box, "changed",
G_CALLBACK (select), NULL);
and
void select(GtkComboBox *combo)
{
char *name = NULL; /* or gchar, it is the same */
name = PTALLOC(char);
if (gtk_combo_box_get_active_text (combo) == NULL){
printf("What are we doing in here ???");
} else {
name = gtk_combo_box_get_active_text (combo);
....;};
}
-------------------------------
Any call to "select" ends in Segmentation fault ...
One full day that I'm looking at that :-(
Any help appreciated :-)
Best,
Amities,
Olivier
--
Antonio Gomes
E-mail: antonio gomes indt org br
Embedded Linux Lab - 10LE
INdT - Instituto Nokia de Tecnologia (Manaus/Br)
NOKIA's Technology Institute
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]