[Glade-users] Problems with lookup_widget()

Magnus Wirström asdlinux@yahoo.se
Sun, 8 May 2005 21:32:59 +0200


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