Re: Re :Re: Global window???



On Mon, Feb 25, 2002 at 07:27:29PM +0000, Mauro Romano Trajber wrote:
Thanx Marcelo

I try this:
And doesnt work.

button_window2_clicked(){
clist = lookup_widget(GTK_WIDGET(button), "clist");
             wrong ---------^
this widget is the window widget..
the windows you have to keep a pointer as global, at least I recommend for small programs..
then you do:
GtkWidget *CListWindow;
...
at the callback:
GtkWidget *clist;
clist = lookup_widget(CListWindow, "clist");
my_text = gtk_entry_get_text(GTK_ENTRY(entry_text));
gtk_clist_insert(GTK_CLIST(clist1), 0, &my_text);

/*Error - clist in another window!!!*/
entry_text = lookup_widget(GTK_WIDGET(button), "entry_text");

gchar *my_text;

my_text = gtk_entry_get_text(GTK_ENTRY(entry_text));
gtk_clist_insert(GTK_CLIST(clist1), 0, &my_text);
ERROR IN LAST LINE !!! Cuz the clist are in another window.

how can i make a callback???
thanx
---end quoted text---

-- 
Marcelo R Leitner <mrl netbank com br>
ICQ #: 29966851



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