Hi Alejandro It can be a challenge to integrate procedural concepts like loops with an event-driven environment like Gtk. In fact, your GUI code will already be running in a loop - processing events as they occur. So what you need to do is integrate your loop with the event loop. I'm not completely clear on your requirement, but another way of looking at it might be as a work queue. If you have all the "values" that you want to process in an array, then you could have a key_press_event handler that checks for the Enter key, uses 'shift' to take the next value from the array, does whatever is required and then returns. Next time the key_press_event occurs the handler will run again and get the next value from the array. Eventually the array will be empty and the handler will have no work left to do (perhaps you will pop up a message to the user at that point). Hope that helps Regards Grant On Tue, 2013-08-13 at 11:52 -0500, Alejandro wrote: > Hello, > > I want to create a loop, my explanation is: > > Using a text view, I will introduce values, one by one, and after > pressing enter, the loop should compare the introduced value with the > reference, but, I do not figure how to stablish the loop. > > May you help? > > Alejandro > _______________________________________________ > gtk-perl-list mailing list > gtk-perl-list gnome org > https://mail.gnome.org/mailman/listinfo/gtk-perl-list _______________________________________________ gtk-perl-list mailing list gtk-perl-list gnome org https://mail.gnome.org/mailman/listinfo/gtk-perl-list
Attachment:
verificador_tarjetas_C489_02.pl
Description: Perl program