• cjohnson32

    @cvp that was exactly what I needed. I thought label is what should be used but had no success sending my string. Turns out I was only missing the .text - Thank you!

    posted in Pythonista read more
  • cjohnson32

    Hi all,

    I’m extremely new to python and coding in general. I am trying to create a fairly simple app to clock in and out for work purposes. I have the ui show my “time card” which I want to have a running digital clock at the top of the screen. I can get the time and have it update every second but am having issues sending the string to an (any) object in my ui. Perhaps I’m not using the correct object to display my string or not using the correct code to send it. The error I keep getting is “ui.View” object does not support item assignment. My code looks something like this:

    import ui
    import time
    def change_view(sender):
        '@type sender: ui.Button'
        #get button name:
        b = sender.name
        v = ui.load_view(b)
        return v.present()
    def update_time():
        while True:
            v1['clock_view'] = time.strftime('%r')
    v1 = ui.load_view('time_card')
    v1.present() ```

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!