How to control focus "manually"
| From: | UOL) | Date: | Sun, 02 Nov 2003 02:51:22 +0000 |
| Subject: | How to control focus "manually" | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-4036@lists.php.net to get a copy of this message | ||
Hello all,
Played around with the "connect_after" function, but I now found out what is going on but cannot find the solution...
What seems to be happening is a race condition because of the "focus-out" event, that is if I place a "set_focus" call within a function that is called by "focus-out", it will trigger an "focus-out" event again creating an endless loop.
What I need to solve this problem is to prevent this recursion, ie. if I call a "set_focus" from within a "focus-out" callback function, it won't call itself again. Is there any way to do that? Is there a way to "block" a signal just once?
It seems that GTK's "signal_emit_stop" function does something like this, but I couldn't understand how to use it...
Thanks for the tips so far!
Paulo.
Christian Weiske wrote:
Hi
It seems to me, that an infinite loop begins when the "focus-out" event
occurs.
To which function did you connect this event?
If something in this routine causes the adicionaproduto() function to be
called which itself starts the other routine, you've got a never ending
loop.
Perhaps you should try it with "connect_after" and the "focus-out"
event.
Regards/MfG,
Christian Weiske
<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>
Christian Weiske
cweiske@cweiske.de
www.cweiske.de
<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>
Always forgetting birthdays? Try birthday reminder!
http://www.cweiske.de/birthday.htm