Re: help on gtk with mysql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 17, 2006 at 02:38:31PM +0300, Tor Lillqvist wrote:
> 
>  > doSQL(conn,"INSERT INTO test(id )VALUES("%s"),p");
> 
> How does this even compile?

It cannot, there also undeclared variables (combo),
nonexistent functions (strdup), broken strings, and I'm not
sure if the Sameer/Prathibha understands GtkCombo and
GtkComboBox are two different widgets -- and the former is
deprecated -- because the code uses GtkCombo while the
e-mail talks about combo *boxes*.

Anyway, the problem is that GtkCombo has no "text" property
-- BTW, this should be clearly seen from the run-time
warnings the attempts to set and get it cause (if not from
the documentation).  But all I can say about the proper use
of GtkCombo is: Don't, use GtkComboBox instead.

Also,

   g_object_get(combo, "text", &p, NULL);
   p = g_strdup(p);

would be a memory leak because g_object_get() already creats
a new copy of the string.

Yeti


--
Whatever.
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux