• npr3ha

    @JonB You are the man. It was how I had flex set up.

    posted in Pythonista read more
  • npr3ha

    Hello all,
    I have some code that works exactly as desired when I present the view as a view.present('sheet'). However, if I change it to view.present('fullscreen'), the three buttons on the screen no longer work. They don't appear to be linked to anything (no animation when they are touched). I am not changing anything other than the presentation mode. The buttons still appear on screen. They just don't do anything. Does anyone know what I need to do? Am I missing some important aspect of the ui module? I've read the docs for the ui module and I don't see anything that would be causing this issue. Thanks for the assistance.

    posted in Pythonista read more
  • npr3ha

    Ah. Everything works now. Thank you!

    posted in Pythonista read more
  • npr3ha

    Hello, I’m very new at this, but I’ve read the Ui docs provided with the app and done some googling, and I still can’t find a solution to a problem I’m having. I’m trying to populate a textView with the first element of a list, then change the contents of the textView after a button is pressed. However, I cannot get the textView to show the first element of the list. The error I’m getting points to the last line of my code (line 36), and says: ‘NoneType’ object has no attribute ‘text’. In my UI file, ‘examElement’ is the Name of the textView. I think I’ve followed the format of how I’ve seen others use textViews, but maybe not. Hopefully it’s an easy fix! Thanks

    import ui
    strokeExamElements = ["You can't teach an old dog new tricks","Age? Month?","Close eyes tightly, open eyes wide","Facial droop","Visual Fields (4 quadrants)","Horizontal gaze tracking","Arm Drift","Leg Drift","Sensory: Arm","Sensory: Leg","Coordination: Arm (finger-nose)","Coordination: Leg (heel-shin)"]
    i = 0
    listOfPositives = []
    def nextExamElement():
        global i
        i += 1
        view['examElement'].text = strokeExamElements[i]
    def animation():
        sender.alpha = 0.0 # fade out
    # must define the button_tapped action prior to loading the view
    def button_tapped(sender):
        buttonTitle = sender.title
        if buttonTitle == 'Negative':
        elif buttonTitle == 'Positive':
        elif buttonTitle == 'Show Results':
            # TODO: add new view to display the list of positive elements
            ui.animate(animation, duration=0.75)
    view = ui.View()
    view['examElement'].text = strokeExamElements[i]

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!