[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Problem
- From: "Chris Jones" <chris black-sun co uk>
- To: "GTK Devel" <gtk-app-devel-list redhat com>
- Subject: Problem
- Date: Fri, 13 Aug 1999 01:54:52 +0100
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi
Forgot this one in the last mail (Doh!)
I'm storing some data with each line in my CList widget. It's usually
a string about 20 characters in length.
Later in my program, I rely on that data to uniquely identify the
contents of the row, but I'm getting inconsistant results when I ask
for that data back again.
I add the CList rows with:
row_num = gtk_clist_append( GTK_CLIST( w->MessageList ), msg_list_row
);
gtk_clist_set_row_data( GTK_CLIST( w->MessageList ), row_num,
msg_list_row[4] );
(msg_list_row is the array of char with the CList row data in it and
msg_list_row[4] is the unique data). There are only 4 columns in the
CList, so msg_list_row[4] _should_ be ignored by the
gtk_clist_append() call. In a different callback, I do:
gpointer *mId = 0;
mId = gtk_clist_get_row_data( GTK_CLIST( w->MessageList ), row );
g_print("mId: '%s'\n", (char *)mId);
This works a for the first few times that the callback is called, but
after that, mId either points to NULL, or some random memory being
used elsewhere by my app. Is there something I'm not doing properly?
I've verified that the unique data is being stored correctly as I can
get the information the first few times gtk_clist_get_row_data() is
called, but after that, even on the same rows that returned correct
data before, it returns junk.
One other thing, when it comes to debugging my app, I use xxgdb, but
it isn't able to follow from gtk_main() into the callbacks which is
making life a lot harder. Is there a way I can easily debug the
callbacks?
- ---
Chris Jones
Black-Sun Software
chris@black-sun.co.uk
www.black-sun.co.uk
"Linux is beating Windows" - David Cole, Microsoft Executive
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.5.3i for non-commercial use <http://www.pgpi.com>
iQA/AwUBN7Ns25hmBipjerS3EQJGFwCfY213utffzQDRkH9cr9HiJ1euInAAni1H
anomDEMf6HXPiFYNtSPl5obm
=LY3u
-----END PGP SIGNATURE-----
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]