• @david

    monkey patch of a module that you are sure it will be called after creation of the tableview of dialog fields (in my poor English)

    import ui import dialogs def my_tableview_cell_for_row(self, tv, section, row): if self.view.background_color != 'blue': self.view.background_color = 'blue' return self.cells[section][row] dialogs._FormDialogController.tableview_cell_for_row = my_tableview_cell_for_row fields = [{'title':'title1','type':'text','value':''}, {'title':'title2','type':'text','value':''}] f = dialogs.form_dialog(title='dialog title', done_button_title='ok',fields=fields, sections=None)
  • Hi,

    every application can register custom URL scheme on iOS. And any other app (like Pythonista) can use this URL scheme to test if application is installed or not via canOpenURL. This was unlimited prior to iOS 9. But Apple didn't like it, because there were many apps that did track what user has or hasn't installed, etc. To make it harder for those people, iOS 9 changed policy for canOpenURL. Any application can still use canOpenURL to test if the application is installed or not, but it must include these custom URL schemes in the Info.plist file (LSApplicationQueriesSchemes key). Basically Apple is checking this during review. This also means that if you'd like to test if application is installed or not from Python script (= from Pythonista), Pythonista must have all these custom URL schemes defined in the Info.plist file, which is not possible. Unfortunately the answer is no, you can't do it.

    Answer to your remaining questions is same - no, it's not possible.

    HTH,
    Zrzka

  • That would be great!
    Would really like to see that come true

  • You could omit the repeat_forever, but it creates a fun effect, where you can have multiple spots repeating at once. But you should get the idea here...

    import scene,ui class MyScene(scene.Scene): def __init__(self, in_dot_color=scene.Color(0, 0, 0, 1)): super().__init__() self.dot_color = in_dot_color self.touch = None self.points=[] self.timing=[] def draw(self): ''' real time drawing only''' scene.background(0, 0, 0) if self.touch: scene.fill(self.spot_color) loc = self.touch.location scene.ellipse(loc.x - 50, loc.y - 50, 100, 100) scene.text('{}, {}'.format(*loc), 'Futura', 20, 100, 50) def touch_began(self, touch): '''register initial point and time''' self.points=[touch] self.timing=[0] self.touch = touch self.t0=self.t loc=touch.location self.spot_color=(loc.x/self.bounds.width, loc.y/self.bounds.height, .5) def touch_moved(self, touch): '''Record points and relative timing ''' self.touch = touch self.points.append(touch) self.timing.append(self.t-self.t0) def touch_ended(self, touch): '''instantiate a shapenode, and animate it''' self.touch = None self.spot=scene.ShapeNode(path=ui.Path.oval(0,0,100,100),parent=self) self.spot.fill_color=self.spot_color self.spot.position=self.points[0].location actions=[] for i in range(len(self.points)-1): duration=self.timing[i+1]-self.timing[i] loc=self.points[i].location actions.append(scene.Action.move_to(*loc,duration)) self.spot.run_action(scene.Action.repeat_forever(scene.Action.sequence(actions))) s=MyScene() scene.run(s, show_fps=True)
  • Hi all,

    The intention was to use the docopt package, but being so, I am assuming that I need to do a specific UI. The mini game aims to emulate a system admin terminal.

    The case is that I will need a virtual keyboard (do I have to do it or is there any available in/for pythonista?)

    Cheers,
    David

  • Hi, Many thanks to all. I will follow these indications.
    I believe that they are sufficient for now.

  • Nice. This work. Thank you!

Internal error.

Oops! Looks like something went wrong!