On 10/27/2014 06:32 PM, andy pugh wrote:
> I seem to have found an earlier point to stall at.
>
> The application is a GUI for my hobber. I want to be able to enter DP
> in the DP box, or Mod in the Mod box.
> If I enter a Mod number I want the DP box to be updated to show the
> equivalent DP, And vice-versa.
>
> Unfortunately this ends up in an infinite loop of calls, as the change
> to one invokes a callback that changes the other which invokes a
> callback. ]
>
> In VBA you get round this with Application.ProcessEvents = 0 (IIRC).
>
> Does anyone know how to do the equivalent thing with Python and Glade.
> (Using Glade to create the GUI means no chance to grab the event
> handler ID at event connection time)
>
> module.handler_block_by_func(module.on_change)
> dp.handler_block_by_func(dp.on_change)
>
> Looked like it might work, but doesn't.
>

In my UI the DP entry gets processed with the on_dp_entry_activate 
callback. The Mod gets processed with on_mod_entry_activate. Part of the 
processing of one entry is to calculate and update the other entry 
display. Changing the other entry from the calc doesn't cause an 
activate, so there is no looping. It may be that looking at what event 
is being used for your entry might shed light on your loop.

-- 
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/

------------------------------------------------------------------------------
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to