omz:forum

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

    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 8
    • Best 0
    • Controversial 0
    • Groups 0

    tachijuan

    @tachijuan

    0
    Reputation
    546
    Profile views
    8
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    tachijuan Unfollow Follow

    Latest posts made by tachijuan

    • RE: How to prevent screen lock

      excellent. Thanks everyone. Was looking for screen lock and not sleep. And was looking through the UI module and not the console module. This works perfectly.

      posted in Pythonista
      tachijuan
      tachijuan
    • How to prevent screen lock

      Folks,

      I have a script that I wrote to keep track of a pool game my buddies and I play. It uses the ui module to build a simple GUI with a list of players and keeps track of the score by touches on the names of the players. Sometimes a player's turn in this game can last a while and the screen locks. Is there any way to temporarily disable the phone's screen lock function?

      Thanks...

      posted in Pythonista
      tachijuan
      tachijuan
    • RE: example of a custom tableviewcell

      aha!

      Cool. Thank you!

      posted in Pythonista
      tachijuan
      tachijuan
    • example of a custom tableviewcell

      Hey Folks,

      I'm trying to write a simple score keeper for a pool (billiards) game that my friends and I play. I have the basic mechanics down with the default tableviewcells, but I'd like to make the result a bit prettier by using a custom tableviewcell. I've looked around github and the forums, but I can't find any examples of how to do this. Does anyone have a simple example I can copy from? I'd like to have a cell that has two text labels and an image view all in a single row.

      Any help or pointers would be very helpful.

      Thanks,

      Juan

      posted in Pythonista
      tachijuan
      tachijuan
    • RE: example of a custom tableviewcell

      Cool. That is brute force. Is there no way to give the subview a "name" property so that I can do something like:

      cell = ui.TableViewCell()
      tl = ui.TextLabel()
      tl.name = "hits"
      cell.add_subview(tl)
      cell['hits'] = "2"
      

      Or something like that? The docs seem to say that you can but for some reason it's not working for me.

      posted in Pythonista
      tachijuan
      tachijuan
    • RE: example of a custom tableviewcell

      OK - I was able to make it work by creating a subview and adding the text/image before I added it to the tableviewcell. Still not sure how I would change it after the fact. I tried using the "name" property as the way to refer to the subview. How do I refer to the subviews after I've added them to the tableviewcell?

      Sorry for the rookie questions, but I'm still wrapping my head around this one.

      posted in Pythonista
      tachijuan
      tachijuan
    • RE: example of a custom tableviewcell

      I think that will do it. Have a long flight tomorrow so I can play with this. Thanks for the help fellas.

      posted in Pythonista
      tachijuan
      tachijuan
    • RE: example of a custom tableviewcell

      Thanks for the pointer.

      I saw something similar, but this isn't a custom tableviewcell from what I gather. This is just a way to specify the cell type based on pre-defined cell types (subtitles, etc.). I'd like to have a custom tableviewcell class with the three views (two text labels, and one image view). Then during the tableview_cell_for_row method I would instantiate a copy of my own class instead of ui.TableViewCell().

      posted in Pythonista
      tachijuan
      tachijuan