Aug-08-2018, 01:42 AM
(This post was last modified: Aug-08-2018, 01:50 AM by PySimpleGUI.)
(Aug-08-2018, 01:17 AM)jfong Wrote: It happens just two steps away from the form shows up. First, making a selection at the ComboBox. Second, click Submit button.Does it happen when you run the demo program from the command line, or only when you import it?
This
python Demo_Recipes.pyproduces the same result?
When I tried to duplicate the steps on my machine, I get no problems. I tried it on Raspberry Pi running 3.4 and didn't get an error either.
Quote:Python 3.6.2 |Anaconda, Inc.| (default, Sep 19 2017, 08:03:39) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import Demo_Recipes
>>> Demo_Recipes.Everything()
>>>
On unpacking return values.... I recommend not using any kind of "indexes". For example, unpack directly into the user's variables:
button, (name, address, phone) = form.LayoutAndRead(layout)Or do the unpack in 2 steps:
button, values = form.LayoutAndRead(layout) name, address, phone = valuesI do not recommend keeping track of offsets like this:
button, values = form.LayoutAndRead(layout) name = values[0] address = values[1] phone = values[2]