beeware / toga

A Python native, OS native GUI toolkit.
https://toga.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
4.36k stars 674 forks source link

implementations should use interface values (vs raw) #1315

Closed aerickson closed 1 year ago

aerickson commented 3 years ago

Describe the bug The code below explodes on iOS and Android (Mac/cocoa must do some casting?).

It works if the integers are cast via str().

        self.interval_input = toga.TextInput(
            placeholder=2, readonly=True, initial=2
        )

To Reproduce Steps to reproduce the behavior:

  1. Create an app with the code above
  2. briefcase run iOS or briefcase run android
  3. App will crash

Expected behavior The code above should work.

Screenshots n/a

Environment:

aerickson commented 3 years ago

somewhat related: Selection boxes will explode on iOS if items=a_dict.values() vs a list(). Using items=a_dict.values() works fine on Android and Cocoa.

toga_iOS/widgets/selection.py", line 19, in pickerView_titleForRow_forComponent_

freakboy3742 commented 1 year ago

This will be resolved (and tested) by the textinput widget audit in #1944.