[Glade-users] Problems with lookup_widget()
- From: Mateusz Misiorny <mateusz misiorny gmail com> (Mateusz Misiorny)
- Subject: [Glade-users] Problems with lookup_widget()
- Date: Mon, 9 May 2005 00:57:59 +0200
On 5/8/05, Magnus Wirstr=F6m <asdlinux yahoo se> wrote:
Hi
=20
I have a problem with my app. I'm doing kinda lots of lookup_widget() com=
mands
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 duplic=
ate
dont, and i can't figure out why. The code looks like this:
=20
*crash here* entry_widget =3D lookup_widget(GTK_WIDGET(button), "text_=
paket");
buffer =3D gtk_entry_get_text(GTK_ENTRY(entry_wid=
get));
strncat(post,buffer,cut_string(buffer));
strncat(post,"\t",1);
=20
here is a sample of the code that does work just fine:
=20
entry_widget =3D lookup_widget(GTK_WIDGET(button)=
, "text_personnummer");
buffer =3D gtk_entry_get_text(GTK_ENTRY(entry_wid=
get));
strncat(post,buffer,cut_string(buffer));
strncat(post,"\t",1);
=20
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.
Like my buddy I wrote lots of KBs of code with says "this is
programming my man" ;)
Please include more info on you problem. The "*crash here*" line looks
just fine, but we don't know what is the entry_widget, what is the
button, the context, and so on.
Try to debug your code step by step - one of the greatest debuggers
even made is "printf()".
By "crash" you mean segfault? That's strange, since GTK doesn't
segfault when fed with wrong pointers (at least in my (little)
experience).
Did you try to narrow down the problem to as simple app as possible?
i.e. get rid of all but the crashing part and see if it still crashes?
mati
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]