Re: getting text



On Saturday 26 Jul 2003 5:17 pm, Bart Vandewoestyne wrote:
I'm quite new to GTK, so here's my (possibly stupid) question:

Look at (simple) the code at
http://mc303.studentenweb.org/downloads/mms_gui.c

The situation is:

GtkEntry is within GtkHBox is within GtkVBox is within GtkWindow

In my main, i use for example the create_mms_url_widget() to separate
the creation of some 'building block-widgets' and keep my code
'managable'.  But now, i came to the point where i need the text from
the text-entries within those 'composed-widgets'.

I need the text within the go_clicked callback function.

I suppose i should pass it via the 'gpointer data' somehow, but up until
now, it is not yet quite clear to me how i should do this...  I think I
will need a struct for that, right?  But how exactly?

Am I on my way of making my code 'readable', 'understandable' and
'enough modular' and how can i retrieve the text within the go_clicked
callback?


Code seems eminently readable to me.  Your problem stems from the fact that 
the pointers to the text entry widgets are 'lost' in the nice tidy 
subroutines in which you create them.  You need these to access the text.

ian




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