[Sugar-devel] Is there a way to purposefully do synchronous GUI updates?

Ajay Garg ajay at activitycentral.com
Mon Aug 20 14:41:13 EDT 2012


Hi all.

I frequently happen to encounter cases, where GUI updates do not happen in
the in-order manner.
For eg, if the code is on the lines ::

                                      logic statement 1
                                      update GUI
                                      logic statement 2



the actual procedure that happens is ::

                                     logic statement 1
                                     logic statement 2
                                     update GUI




However, if I do something like

                                     logic statement 1
                                     update GUI
                                     gobject.idle_add(logic statement 2)

the procedure now runs in in-order.



The above is not a problem for such trivial cases, but it IS a problem,
when we want to have seemingly in-order GUI updates, when the code runs
deep.


So, is there a way to have the code always in-order; in other words, have
the GUI updates absolutely synchronous?


WIll be grateful for a reply.


Thanks and Regards,
Ajay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20120821/beffe335/attachment.html>


More information about the Sugar-devel mailing list