Re: [gtk-list] Re: callback error II
- From: Omar Armas Aleman <kaos jlagunez iquimica unam mx>
- To: gtk-list <gtk-list redhat com>
- Subject: Re: [gtk-list] Re: callback error II
- Date: Sat, 20 Feb 1999 14:40:09 -0600 (CST)
On Sat, 20 Feb 1999, Havoc Pennington wrote:
>
> On Sat, 20 Feb 1999, Omar Armas Aleman wrote:
> >
> > static void
> > do_search(GtkWidget *widget, GtkWidget *list)
> > {
> > GtkWidget *item;
> >
> > if (o_menu_state == 0)
> > {
> > add_item_to_list(list, "Resultado de rfc");
> > }
> > else if (o_menu_state == 1)
> > add_item_to_list(list, "Test nombre");
> > }
> >
>
> Hmm, this function does nothing if o_menu_state is not 0 or 1 -
> what happens if you add
> printf("Start of callback - o_menu_state %d", o_menu_state);
> at the beginning, outside of any if statements?
I had it in this way:
static void
do_search(GtkWidget *widget, GtkWidget *list)
{
GtkWidget *item;
if (o_menu_state == 0)
{
appbar_message("RFC!");
add_item_to_list(list, "Resultado de rfc");
}
else if (o_menu_state == 1)
{
appbar_message("Name!");
add_item_to_list(list, "Test nombre");
}
else
g_error("bad o_menu_state value in function do_search");
}
And a message to the appbar was always sent.
>
> (or if you print the variable's value with gdb?)
>
> Other than that I don't see any problem.
>
Ok, I'll try to find out the problem.
Thanks.
Omar
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]