omz:forum

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

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

    Appletrain

    @Appletrain

    1
    Reputation
    538
    Profile views
    11
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Appletrain Unfollow Follow

    Best posts made by Appletrain

    • RE: tableview_did_select

      Thank you all. @ui.in_backround solved it.

      posted in Pythonista
      Appletrain
      Appletrain

    Latest posts made by Appletrain

    • RE: mysql

      Disregard, I found a different source.

      posted in Pythonista
      Appletrain
      Appletrain
    • mysql

      Trying to install mysql connector and I keep getting the following error:

      StaSh v0.7.4 on python 3.6.1
      [~/Documents]$ pip install mysql-connector-python
      Querying PyPI ...
      Downloading package ...
      Opening: https://files.pythonhosted.org/packages/f5/7a/88b5c614ea45d009b26b82ee2269ef0619d4aaf408328a7d7b2a906fc11e/mysql_connector_python-8.0.22-py2.py3-none-any.whl

      Save as: /private/var/mobile/Containers/Data/Application/C22B673E-B2E7-46C1-A1A6-B5AD5495E91E/tmp//mysql_connector_python-8.0.22-py2.py3-none-any.whl (374348 bytes)
      [====================] 100.00% | 365.6KiB
      Installing wheel: mysql_connector_python-8.0.22-py2.py3-none-any.whl...
      stash: <class 'stashutils.wheels.WheelError'>: top_level.txt entry 'mysql' not found in toplevel directory!

      Has anybody run into this? Is there a solution?

      posted in Pythonista
      Appletrain
      Appletrain
    • RE: Tableview_select

      @mikael, thank you, that took care of it. I had tried that, but I put it at the update function not the select function.

      posted in Pythonista
      Appletrain
      Appletrain
    • RE: Tableview_select

      @mikael, this is about as stripped out as I can make it

      def tableview_add(self):
                  trxRec = {}
                  result = {}      
                 # trxRec = {'account': self.selected_account}
                  result = bucks_dialog(trxRec)    # this works
              
          def tableview_update(self):
                  result = {}
                  trxRec = {}
                 # trxRec = self.selected_item
                  result = bucks_dialog(trxRec)    # this blows out - self.container_view changes to None
              
          def tableview_did_select(self, tv, section, row):
                  self.tableview_update()
              
      def transaction_action(sender):    # sender is ui.button
          sender.tint_color = 'blue'
          ds.tableview_add()
      

      Bucks_dialog is a custom form_dialogs from dialogs

      Error is:

      Pythonista3/Documents/Projects/bucks/bucks_form.py", line 217, in trans_type_action
      self.container_view.name = segment_names[ind]
      AttributeError: 'NoneType' object has no attribute 'name'

      self.container_view is none (form_dialog)

      posted in Pythonista
      Appletrain
      Appletrain
    • RE: Tableview_select

      @mikael Thanks @mikael, doesn’t help. Same error, same place. What I can’t understand is why it works one place and not another. I stripped every thing out of the two functions so they are doing exactly the same thing. On blows up, the other does’t.

      posted in Pythonista
      Appletrain
      Appletrain
    • Tableview_select

      I’ve written a custom input form sub-classed from input form dialog. It works fine stand alone. It also works fine when called from a button on my tableview form. When I call it from tableview select, it blows out. Somehow container_view becomes None. I’ve tried everything I can think of, including calling the button action. Any thoughts?

      posted in Pythonista
      Appletrain
      Appletrain
    • RE: tableview_did_select

      Thank you all. @ui.in_backround solved it.

      posted in Pythonista
      Appletrain
      Appletrain
    • tableview_did_select

      I’m launching a standard dialog from tableview_did_select

      def tableview_did_select(self, tableview, section, row):
              self.selected_row = row
              self.selected_section = section
              print(dialogs.list_dialog('list dialog', items=['happy', 'days', 'are', 'here', 'again']))
      

      This always returns None!

      However, if it’s launched from a ui.ButtonItem on the same view it works properly and returns the selected item.

      def cancel_action(sender):     
          print(dialogs.list_dialog('list dialog', items=['happy', 'days', 'are', 'here', 'again']))    
          ui.end_editing()
          ds.container_view.close()
      

      This always returns the selected item

      Any suggestions on making tableview_did_select work?

      posted in Pythonista
      Appletrain
      Appletrain
    • RE: Simple (I think) alert dialog question

      @cvp Thank you, that did it.

      posted in Pythonista
      Appletrain
      Appletrain
    • RE: Simple (I think) alert dialog question

      It crashes Pythonista. It’s a switch on a simple test form. Does’t do anything. Tap the switch and pythonista locks up.

      posted in Pythonista
      Appletrain
      Appletrain