• 7upser

    You can find Editorial under the action group 'Apps', if you have installed Editorial.

    posted in Editorial read more
  • 7upser

    You can Send the App Store link to Apples Shortcut -> Editorial Workflow.

    From there you have Python to do what you want.

    posted in Editorial read more
  • 7upser

    Hi, @OkieWolf

    You can post your Code with the top right button in the forum Editor.
    </>
    This result in better formatting Code.

    To debug your Code:
    Close your UI View and click the right Button where you see the Errormessage.

    tag

    Then click on Variables

    tag

    There you can see that ang and rad are strings.
    You can also set Breakpoints by tap and Hold within the Editor.
    Or you can use a print command: print(type(rad))

    You only need to convert them to float. And the Result back to string

    arc = str(float(rad) * float(ang) * pi / 180)
    

    Edit: See you solve your Problem

    posted in Pythonista read more
  • 7upser

    @OkieWolf, I think @mikael is write. You can do it with the pyui Editor too.

    tag

    You need also change the order of your Pythoncode (def needs to be before the main Program).

    
    import ui
    import math
    
    def button1_tapped(sender):
        rad = sender.superview['textfield1'].text
        ang = sender.superview['textfield2'].text
        pi = math.pi
        sender.superview['label1'].text = rad
        
        
    v = ui.load_view()
    v.present('sheet')
    
    

    posted in Pythonista read more
  • 7upser

    Did you set button.action?
    Here is a quick + dirty Example in Pythonista

    
    import ui
    import math
    
    class cUIView(ui.View):
        def __init__(self):
            self.name = 'Title'
            self.width = 300
            self.height = 200
    
            self.lbl01 = self.makeLabels('angle')
            self.lbl02 = self.makeLabels('radius')
            self.lbl03 = self.makeLabels('arc length')
            self.txtView01 = self.makeTextview()
            self.txtView02 = self.makeTextview()
            self.txtView03 = self.makeTextview()
            self.btn01 = self.makeButtons('btn01')
            
            self.style()
    
        def layout(self):
            # layout of the ui.view, will be called when a view is resized
            self.lbl01.frame = (10, 10, 100, 40)
            self.lbl02.frame = (150, 10, 100, 40)
            self.lbl03.frame = (10, 100, 100, 40)
            self.txtView01.frame = (10, 50, 100, 40)
            self.txtView02.frame = (150, 50, 100, 40)
            self.txtView03.frame = (10, 140, 100, 40)
            self.btn01.frame = (150, 100, 100, 40)
    
        def style(self):
            # the view style
            self.background_color = 'lightgrey'
            self.txtView01.text = str(1.5)
            self.txtView02.text = str(10)
    
        def makeButtons(self, vName):
            vButton = ui.Button()
            vButton.name = vName
            vButton.title = vName
            vButton.border_width = 1
            vButton.action = self.btnAction
            self.add_subview(vButton)
            return vButton
    
        def makeLabels(self, vName):
            vLabel = ui.Label()
            vLabel.name = vName
            vLabel.text = vName
            vLabel.border_width = 1
            vLabel.alignment = ui.ALIGN_CENTER
            self.add_subview(vLabel)
            return vLabel
    
        def makeTextview(self):
            vTxtView = ui.TextView()
            vTxtView.border_width = 1
            self.add_subview(vTxtView)
            return vTxtView
    
        def btnAction(self, vSender):
            if vSender.name == self.btn01.name:
                pi = math.pi
                angle = float(self.txtView01.text)
                radius = float(self.txtView02.text)
                arc = radius * angle * pi / 180
                self.txtView03.text = str(arc)
    
    if __name__ == '__main__':
        vView = cUIView()
        vView.present('sheet')
    
    

    posted in Pythonista read more
  • 7upser

    or tap and hold space

    posted in Pythonista read more
  • 7upser

    @DaricLiu ,
    Try to reboot your device.
    We have discussed this: see here

    And i found out, it isn't the same Path twice. If you move the Script, it is old Path and new Path.

    posted in Pythonista read more
  • 7upser

    There is also a system wide Clipboard:
    Use Universal Clipboard to copy and paste between your Apple devices

    (doesnt help here, but i found it interest to know)

    posted in Pythonista read more
  • 7upser

    @dougler1, or send a screenshot, so we know where you are within your Pythonista.

    To send a screenshot you can use:
    ![tag](url)
    -and-
    https://imgur.com/

    posted in Pythonista read more
  • 7upser

    @Drizzel, you could be right about iPadOS i test it at my iPhone with iOS 12.4.5 and then 12.4.6 and it works. There is also no popup.

    About the german one, nobody should know about this, before the stupid one (me) send a screenshot 🤫

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!