Re: Segfault and cheep mend of gtk_combo_box_get_active_text
- From: Olivier Ramare <Olivier Ramare math univ-lille1 fr>
- To: Juergen Dankoweit T-Online de
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Segfault and cheep mend of gtk_combo_box_get_active_text
- Date: Sun, 01 May 2005 09:12:22 +0200
Bien le bonjour,
Guten Tag,
and good morning to all others ! (Oh : chao also !)
void selecter(GtkComboBox *combo)
{
gchar *name;
if ((name = gtk_combo_box_get_active_text
(GTK_COMBO_BOX(my_combo_box))) == NULL){
printf("What are we doing in here ???");
} else {
printf("Ok %s \n", name);};
}
The point is here, that my_combo_box COULD not be initialized.
In my programs I had several problems with that behavior and I solved
this by using the widget that is declared in the function call. In your
example it is combo. So the code looks like:
void selecter(GtkComboBox *combo)
{
gchar *name;
if ((name = gtk_combo_box_get_active_text
(combo)) == NULL){
printf("What are we doing in here ???");
} else {
printf("Ok %s \n", name);};
}
Well I tried both in my very hackish programming way :-)
and both crashed. The signal you sent was "changed", yes ?
Best,
Amities,
Olivier
--
1rst of May: no work, but demonstration FOR work.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]