clist woes
- From: Ed Schreder <eds kendeco com>
- To: gtk list <gtk-list redhat com>
- Subject: clist woes
- Date: Fri, 3 Apr 1998 13:38:49 -0600 (CST)
Oops:)
Ok this is my problem, I am writing a program which allows a user to
browse a database, the user can either type in an item number or a
description, if the user only types in a partial item # or description
they get a list of items which are close the the item typed. I am using
a clist widget to display the list, my problem is that I can't seem to
get the info from the selected row. What I am trying to do is copy the
data to a structure which then sends the records data to a generic
display widget I created. I am using the clists gtk_clist_get_text()
procedure but I keep getting seg faults when I try to either do a strcpy
or an sprintf to the structures field, like this
gtk_clist_get_text(GTK_CLIST(listwidget), row, column, &text);
sprintf(myStruct->field, "%s", text); <-- Crashes here
I put this code in a signal for the clist "select row" event and return
the structure which then gets used by an ok button.
Does anyone have any ideas as to why I get the segfaults when I try to
copy the text into my string? Am I blind and just not seeing the reference
here?
Thanks
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]