An 'oldie' question... GtkCList anyone?

2009-01-27 Thread John Coppens
Hello people. In the process of converting an old program from mSQL to MySQL, I found a couple of potential traps and optimized a couple of functions. I now have a problem with adding lines into a GtkCList using gtk_clist_append. The code is like this: char *bff, str[4]; bff =

Re: An 'oldie' question... GtkCList anyone?

2009-01-27 Thread Tomas Soltys
Hi, try to declare str as: char *str[4]; Regards, Tomas Hello people. In the process of converting an old program from mSQL to MySQL, I found a couple of potential traps and optimized a couple of functions. I now have a problem with adding lines into a GtkCList using gtk_clist_append.

Re: An 'oldie' question... GtkCList anyone?

2009-01-27 Thread Tomas Soltys
Hi, try to declare str as: char *str[4]; Regards, Tomas Hello people. In the process of converting an old program from mSQL to MySQL, I found a couple of potential traps and optimized a couple of functions. I now have a problem with adding lines into a GtkCList using gtk_clist_append.

Re: An 'oldie' question... GtkCList anyone?

2009-01-27 Thread John Coppens
On Tue, 27 Jan 2009 15:53:03 +0100 (CET) Tomas Soltys tomas.sol...@range-software.com wrote: Hi, try to declare str as: char *str[4]; Thanks for the suggestion, but it _was_ defined as a *str[4], of course. I probably would've experienced a lot of SEGFAULTS if not. Sorry for the typo.

Re: An 'oldie' question... GtkCList anyone?

2009-01-27 Thread Nicola Fontana
On Tue, 27 Jan 2009 12:38:09 -0200 John Coppens j...@jcoppens.com wrote: char *bff, str[4]; bff = strdup(abc|def|ghi|etc); Just to show bff has to freed later splitline(bff, str); This puts pointers into str to each of the substrings (at the start and

Re: An 'oldie' question... GtkCList anyone?

2009-01-27 Thread John Coppens
On Tue, 27 Jan 2009 17:02:32 +0100 Nicola Fontana n...@entidi.it wrote: first of all I warmly suggest you to update your code to GtkTreeView. GtkCList is not maintained since ages: you'll surely meet bigger problem than this and you'll be alone. Yes - I'm planning on doing that. But the

Re: An 'oldie' question... GtkCList anyone?

2009-01-27 Thread Carlos Pereira
I have changed recently my CList widgets to TreeView. I suggest you implement a small test case, learn everything you need to your own purposes, and then (and only then) replace everything. I am almost in the end of replacing 119 option menus to combo boxes, so I understand how you feel...

Re: An 'oldie' question... GtkCList anyone?

2009-01-27 Thread Nicola Fontana
On Tue, 27 Jan 2009 19:08:30 -0200 John Coppens j...@jcoppens.com wrote: On Tue, 27 Jan 2009 17:02:32 +0100 Nicola Fontana n...@entidi.it wrote: gtk_clist_append appends only 1 row, so that shouldn't be the problem. The elements in the str[] array correspond to cells, the number is defined