[Glade-users] Problems with lookup_widget()



Hi 

I have a problem with my app. I'm doing kinda lots of lookup_widget() commands 
and they work just fine. To save time i hav dublicated much of the code. The 
thing is that I have a lookup_widget() that crashes my app but the duplicate 
dont, and i can't figure out why. The code looks like this:

*crash here*    entry_widget = lookup_widget(GTK_WIDGET(button), "text_paket");
                        buffer = gtk_entry_get_text(GTK_ENTRY(entry_widget));
                        strncat(post,buffer,cut_string(buffer));
                        strncat(post,"\t",1);

here is a sample of the code that does work just fine:

                        entry_widget = lookup_widget(GTK_WIDGET(button), "text_personnummer");
                        buffer = gtk_entry_get_text(GTK_ENTRY(entry_widget));
                        strncat(post,buffer,cut_string(buffer));
                        strncat(post,"\t",1);

Is there anyone that can help me figure out why i have this behaivour in my 
app. I would say also it was working before but suddenly stopped without any 
reason that i can give.

Thanks for the help.
Magnus




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]