Re: GTK: When 0 + 1 = 0
- From: Paul Pogonyshev <pogonyshev gmx net>
- To: gtk-app-devel-list gnome org
- Subject: Re: GTK: When 0 + 1 = 0
- Date: Tue, 31 Aug 2004 03:54:46 +0300
Ruben Safir Secretary NYLXS wrote:
When I run this through the debugger, it gets to the line:
len = pos + 1;
and it displays that pos is zero and len is zero. In fact, it just swings through this code
completely out of order. I have no idea what gtk_main is doing, but when I code len = pos +0 and pos is
zero, I expect len to be 1.
Also, it seems that the line
pos = gtk_editable_get_position(GTK_EDITABLE(widget));
returns a huge number. I'm completely confused at this point. There must be a reason that this behavior
happening, but I have no clue as to why.
I bet you are compiling with optimization. If your program uses
make -s clean
make -s CFLAGS='-g'
and then debug. If you use a custom Makefile, edit CFLAGS in it.
hope this helps
] [Thread Prev