g_list_append help!



Hi,

I am developing an interactive GUI database using Glade and getting stuck with glist. Anybody knows how to supply parameter to g_list_append by a string variable instead
of a physical string?  In particular, instead of the following line:

combo2_items = g_list_append (combo2_items, (gpointer) _("blue"));

I want to use:
combo2_items = g_list_append (combo2_items, (gpointer) _(entry_name));

where entry_name is a string variable. I tried this and what appeared in combo2_items was not the string represented by entry_name, but some weird characters??? I have tried different ways to format entry_name (added '\0'. added " " around, didn't put it inside parenthasis, didn't cast it ...). None of them worked. Anybody knows the solution? Thanks a lot
in advance!


--
Dzung V. Nguyen                     email: dunguyen iol unh edu
Alpha Linux Group                   http://linux.iol.unh.edu/clp
InterOperability Laboratory
University of New Hampshire         phone: (603) - 862 - 0401
Durham, NH 03824                    fax  : (603) - 862 - 4181





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