• AlanEdwards

    Is it possible to print WYSIWYG? I can take a screen grab of a populated PYUI and can then print it from iPad Photos app but I wondered if i could save a few touches and print directly from the Pyhtonista app?
    Thanks,

    posted in Pythonista read more
  • AlanEdwards

    I had a week or so ago, but did not know then what my head-scratchers were going to be. I'll revisit it. Thanks.

    posted in Pythonista read more
  • AlanEdwards

    Please may I reach out again?, this time for help on scrolling. I have created a PYUI which looks like a spreadsheet created of rows of separate text fields, and action buttons which act upon the text fields in their row.

    I might need to have more rows than are visible on a iPad screen so I had hoped to discover how to add a Scroll View from the PYUI library and position it so my overset rows could be scrolled into view. But obviously I have failed.

    Has anyone a simple example they could share with me please?

    Thanks again.

    Alan

    posted in Pythonista read more
  • AlanEdwards

    Thank you brumm,

    Being an absolute beginner I drowned in that code but I shall persist with it. I figured out how to add a scrollview, and then add items to the subview of that soon after my OP, so slow progress is being made.

    posted in Pythonista read more
  • AlanEdwards

    Hi again,

    On the second phase of my personal project I hope to be able to create a sequence clock, my example is a PYUI with two items - a field for a constantly running digital clock, and a start button. Eventually the screen will have different events announced on screen as their time approaches.

    But as you may have guessed the clock only updates on each press of the button. Can anyone steer me? I'm hoping it is a quick fix, I can't get my head around .self.

    Thanks, Alan

    
    import ui
    import time
    
    def startSequence(sender):
    
        for loop in range(1,3):  # a test number
            currentTime=time.localtime(time.time())
            v['masterClock'].text=time.strftime("%H:%M:%S",currentTime)
            
    # view of the UI is called here
    v = ui.load_view('Sequence Timer')
    
    v.present(orientations=['landscape'])
    

    posted in Pythonista read more
  • AlanEdwards

    Thanks Phuket2, the example JonB sent me worked straight out of the box, and I am sure yours would too, and if I may I will put it in my toolbox for later.

    I learnt a hard-lesson on quoting code on this forum too –

    It has to be three ticks, then on a new line 'python', then a blank line. Then finish with three more ticks.

    Now can you help me on PYUI scrolling? I have a spreadsheet type view designed in the PYUI for the iPad consisting of rows and columns of individual textfields and action buttons, but do I have a clue if it can be made to scroll? No I do not.

    posted in Pythonista read more
  • AlanEdwards

    Thanks JonB, that last example from the link is exactly what I had hoped to have written, and more importantly it is written in a way I should be able to understand, not using those unfathomable classes or selfs. Love it.

    posted in Pythonista read more
  • AlanEdwards

    Wow, thanks. A simple as that, and no doubt after a lot of experience on your part. Thanks.

    posted in Pythonista read more
  • AlanEdwards

    Hello all, totally new to Python and Pythonista although I do have experience of AppleScript.

    First up kudos to Ole, fantastic app.

    Second up is my head scratcher. I'm trying to create a UI with a grid of uniquely identifiable text fields. I don't think I can use a PYUI as I need a running digital clock on the screen at the same time, so I figured I would need to create the UI screen in the code.

    My code to make the first column makes a text box for each iteration through the loop but only the last one displays. What can I add/change to get the earlier ones to display?

    Thanks, Alan

    import ui

    def fieldEdited(sender):
    t=view[fieldName].text
    print t

    for loop in range(1,11):
    fieldName='field' + str(loop)

    view = ui.View()                                    
    view.background_color = 'white' 
                      
    field = ui.TextField()
    
    field.name='field'+str(loop)
    field.text= fieldName
    field.center = (70,(90+loop*30)) 
    field.height=27
    field.width=82
    field.action = fieldEdited                       
    

    view.add_subview(field)

    view.present(style='full_screen',hide_title_bar='True')

    posted in Pythonista read more
  • AlanEdwards

    Thank you ccc, who would have thought I could make such a mess of it?

    Now can anybody solve my original problem, it's a long way back.

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!