> From: bodge...@gmail.com
> Date: Tue, 28 Oct 2014 01:32:19 +0000
> To: emc-users@lists.sourceforge.net
> Subject: Re: [Emc-users] Numeric entry with touchscreen and Glade
> 
> 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.
> 
> -- 
> atp
> If you can't fix it, you don't own it.
> http://www.ifixit.com/Manifesto
> 

Probably the easiest is to add a ignore flag to your handlers.

Then set the ignore flag, call the handler then unset the flag,
ready for the next real entry.

Ugly but it works - This is what Chris R did in TOUCHY.

I have never found a cleaner/easier method.

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

Reply via email to