GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Thu Nov 27, 2014 11:45 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: get_text in the same routine
PostPosted: Fri Jul 19, 2013 10:04 am 
Offline
GTK+ Guru

Joined: Sun Jul 08, 2012 3:14 pm
Posts: 107
Location: Coventry, UK
Hello friends,
when I need to get data from a entry/combo-box, what I do is emit a signal, and callback another routine, like:

Code:
//in main routine 
button = gtk_button_new_with_label("CREATE");
   g_signal_connect(button, "clicked", G_CALLBACK(activate_func), e);


and then define activate_func in another routine:

Code:
void activate_func(GtkWidget *widget, gpointer data) {
    Entries *e = (Entries*) data;
....
}


this is good, but the problem is when I need to read data in loop.
So, I am looking for a way to get those data in the same routine. I understand that there must be some signal to be emitted. but, instead of callback a separate routine, can we get the data in the same routine?
Any idea?


Top
 Profile  
 
 Post subject: Re: get_text in the same routine
PostPosted: Sat Jul 20, 2013 6:25 pm 
Offline
Familiar Face

Joined: Thu Aug 27, 2009 9:44 pm
Posts: 21
You should post a minimal working example that illustrates your problem. From your post it's not clear what you exactly mean.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group