omz:forum

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

    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 1
    • Posts 4
    • Best 1
    • Controversial 0
    • Groups 0

    giraffe

    @giraffe

    1
    Reputation
    670
    Profile views
    4
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    giraffe Unfollow Follow

    Best posts made by giraffe

    • Populating TableView made in the designer from a list

      Hi, I'm struggeling with the tableview and the gui designer..
      How to connect the tableview with the data?

      I try to make a simple list, where you could add items via a textfield and an add-button.
      But I'm stuck with the tableview.
      I have a ListViewSimple2.py, containing the data:

      import ui
      data =['spam', 'ham', 'egg']
      datasource = ui.ListDataSource(data)
      
      view = ui.load_view('ListViewSimple2')
      view.delegate = datasource
      
      nav = ui.NavigationView(view)
      nav.present()
      

      And I have a ListViewSimple2.pyui, containing a tableview( + a button and a textfield).
      What do I have to do to make the tableview show my data?
      I set the TableViews DATASOURCE to datasource, but that seems not to be correct.
      But how to do it right?

      Maybe someone could push me in the right direction?
      Thanks very much in advance

      posted in Pythonista
      giraffe
      giraffe

    Latest posts made by giraffe

    • RE: Pythonista is now featured on Python.org

      Wow- congratulation.
      Well deserved ! Pythonista is such a great app :-)

      posted in Pythonista
      giraffe
      giraffe
    • RE: Populating TableView made in the designer from a list

      Hello JonB and thank you :-) .I tried this and it also works well. But what would be the advantage/ disadvantage of this approach?
      The other way seems to be much easier. Sorry for this noob question, I'm just a beginner trying to get familiar with the ui...

      posted in Pythonista
      giraffe
      giraffe
    • RE: Populating TableView made in the designer from a list

      Yes! It works! Thank you very much for your help! I was looking into the complete wrong direction - I tried to adjust the .pyui- file instead of my .py-file. Thank you again, I would have needed hours after hours to find my mistake.

      posted in Pythonista
      giraffe
      giraffe
    • Populating TableView made in the designer from a list

      Hi, I'm struggeling with the tableview and the gui designer..
      How to connect the tableview with the data?

      I try to make a simple list, where you could add items via a textfield and an add-button.
      But I'm stuck with the tableview.
      I have a ListViewSimple2.py, containing the data:

      import ui
      data =['spam', 'ham', 'egg']
      datasource = ui.ListDataSource(data)
      
      view = ui.load_view('ListViewSimple2')
      view.delegate = datasource
      
      nav = ui.NavigationView(view)
      nav.present()
      

      And I have a ListViewSimple2.pyui, containing a tableview( + a button and a textfield).
      What do I have to do to make the tableview show my data?
      I set the TableViews DATASOURCE to datasource, but that seems not to be correct.
      But how to do it right?

      Maybe someone could push me in the right direction?
      Thanks very much in advance

      posted in Pythonista
      giraffe
      giraffe