Re: [gtk-list] string and new semi-widget/glib
- From: Damon Chaplin <damon karuna freeserve co uk>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] string and new semi-widget/glib
- Date: Tue, 23 Mar 1999 18:31:26 +0000
ZioBudda wrote:
>
> hi,
> I'm writing a new semi-widget (if I can call it in this way) for
> glib library: db (yes it connect glib to database in trasperent way). So,
> in this way I can also write some word (in italian) about "how to write
> program with glib". Now I have see that g_string have not a function the
> return the values of "data", so I have write it (ok, write it is a stupid
> work, 2 lines), but I have a problem to understand
> "g_string_free(string, other_parameter)". I
> don't understand 2nd parameter. I have see the soruce code, and I see :
> if (other_parameter)
> { g_string_free(string)
> }
> but in all case (with other_parameter > 0) the string is free (and it is
> normal). But what's the mean of other_parameter?
See www.gtk.org/rdp - the GLib documentation is available online from the
download page. (A few more volunteers still needed, by the way.)
If the 2nd parameter is FALSE it only frees the memory allocated for the
GString structure. If it is TRUE it also frees the string.
Several of the g_XXX_free() functions work like this (I don't know why).
So you just use TRUE for most purposes.
> Ah, do you think that my idea (db connect) is good?
You might want to look at gnome-db (in Gnome's CVS).
I'd like to see some data-bound widgets created for GTK+ at some point,
so people can create simple database apps with a GUI builder.
Damon
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]