RE:




suppose I have a GtkHScrollbar and a GtkEntry both of which control
the same numerical quantity. Whenever the user changes the position
of the slider I want this change to be reflected in the GtkEntry
and vice versa.
Obviously it won't do to connect the "changed" signals of each
widget to callbacks that change the setting of the other widget
because the other one in turn would emit a "changed" signal as
well, creating an infinite loop.

I had a similar situation with a graphics viewer I was writing, where I wanted the user to be able to drag 
and zoom the image with the mouse, or by scroll bars.  I haven't yet had a chance to solve it myself, but I 
believe it has something to do with blocking signal emmisions.

I do agree, there should be some more mention of this situation in the documentation and/or FAQ's.  I'll also 
be watching this thread for suggestions on how to solve the problem "the proper way"...


Fredderic

_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!



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