omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular
    1. Home
    2. npr3ha

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 4
    • Best 0
    • Controversial 0
    • Groups 0

    npr3ha

    @npr3ha

    0
    Reputation
    696
    Profile views
    4
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    npr3ha Unfollow Follow

    Latest posts made by npr3ha

    • RE: Buttons don't work in fullscreen

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

      posted in Pythonista
      npr3ha
      npr3ha
    • Buttons don't work in fullscreen

      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
      npr3ha
      npr3ha
    • RE: Need help populating a textView

      Ah. Everything works now. Thank you!

      posted in Pythonista
      npr3ha
      npr3ha
    • Need help populating a textView

      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':
      		nextExamElement()
      		
      	elif buttonTitle == 'Positive':
      		listOfPositives.append(strokeExamElements[i])
      		print(listOfPositives)
      		nextExamElement()
      		
      	elif buttonTitle == 'Show Results':
      		# TODO: add new view to display the list of positive elements
      		ui.animate(animation, duration=0.75)
      		pass
      
      view = ui.View()
      ui.load_view('MendExam').present('sheet')
      view['examElement'].text = strokeExamElements[i]
      
      posted in Pythonista
      npr3ha
      npr3ha