Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #69951
| Date | 2014-04-09 08:53 -0500 |
|---|---|
| From | Mark H Harris <harrismh777@gmail.com> |
| Subject | Re: "Latching" variables in function |
| References | <mailman.9045.1397000922.18130.python-list@python.org> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.9076.1397051608.18130.python-list@python.org> (permalink) |
On 4/8/14 3:09 PM, Grawburg wrote: > I have a N/O pushbutton that I want to "latch" a value to a variable when it's been pressed. > I need button_value to become '1' when the button is pressed and to remain '1' until ... > What do I use to 'latch' button_value? Philosophically speaking buttons don't latch. You push the button, an event is generated, and the call-back handles the event to do something in your project. You might try setting a global variable on the button-push event. Or, if I understand you, you might want to use a configurable, like a radio button or a check box, either of which are designed to be "latched". marcus
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
"Latching" variables in function Grawburg <grawburg@myglnc.com> - 2014-04-08 16:09 -0400
Re: "Latching" variables in function Denis McMahon <denismfmcmahon@gmail.com> - 2014-04-09 00:28 +0000
Re: "Latching" variables in function Mark H Harris <harrismh777@gmail.com> - 2014-04-09 08:53 -0500
Re: "Latching" variables in function alister <alister.nospam.ware@ntlworld.com> - 2014-04-09 15:43 +0000
csiph-web