• Harvs

    In this code

    def add_idea(sender):
    global r
    
    v['tableview2'].data_source.items.append(sender.text)
    sender.center=(164,22+((r+1)*v['tableview2'].row_height))
    sender.text=''
    r= v['tableview2'].data_source.tableview_number_of_rows('tableview2',0)
    
    print "before: " + str(v['tableview2'].content_size)
    v['tableview2'].content_size=(0,(r+1)*44) #should allow scrolling
    print 'after: ' + str(v['tableview2'].content_size)
    

    On repeated calling of the function I get this output:

    after: (0.0, 308.0)
    before: (528.0, 308.0)
    after: (0.0, 352.0)
    before: (528.0, 352.0)
    after: (0.0, 396.0)
    before: (528.0, 396.0)
    after: (0.0, 440.0)

    For some context add_sender is an action assigned to a textfield that adds the text onto a table view list, moves the box down one to the new empty cell, however once the list of cells is as long as the scroll view the textfield moves out of the content size and cannot be scrolled to. However when I try and manually set the content size in order to allow scrolling it resets itself?

    posted in Pythonista read more
  • Harvs

    Hi I'm quite a beginner coder and I'm trying to build a test app, in the app I want a slider that corresponds to each cell in a table view and scrolls with it (the user will populate some of the table view cells so new sliders must appear for each new occupied cell). I was wondering how best to go about doing this

    I've built my ui using mainly the ui builder but have found its usefulness limited, is there a way to convert it into pure code?

    Thank you in advance.

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!