• DavinE

    @mikael, you understand it correctly ;)
    hehe thats a great idea.... but i can't try it because i used an other way and i don't have the "old" version....
    maybe it helps other Guys!

    But Thanks for your great help here @mikael !

    posted in Pythonista read more
  • DavinE

    I figured out Whats the issue.....
    I used wait_Modal in my function....
    This did‘t worked with the @script function...

    I do like an workaround.... without wait_Modal and it worked Perfect....

    But @mikael i cant Build an example for you to maybe fix this sry :(

    Thanks for your help! :)

    posted in Pythonista read more
  • DavinE

    @mikael, can you maybe help me out...
    i try to open an Function over a Button (Tapp) but it sill nothing happens...
    i have no idea what's wrong....
    i try the hole day to find it....

    i don't can reproduce it for an example....
    sry :(

    maybe you have an idea what it can be...
    Thanks a lot!

    p.s. That has nothing to do with my other topic.

    posted in Pythonista read more
  • DavinE

    i try to reproduce my issue and show you my example Code

    posted in Pythonista read more
  • DavinE

    hey guys me again,

    i have a confused Situation...
    when i try to tap my button i must tap it two times bevor anything happens...

    do you know what the issue can be ?

    posted in Pythonista read more
  • DavinE

    @cvp, Thanks a lot :)

    posted in Pythonista read more
  • DavinE

    Is there any issue known... ??
    when i try to make an Home screen Icon i get only a white Safari Page....

    posted in Pythonista read more
  • DavinE

    @mikael said:

    @DavinE, could not find a better way to make this reliable than requiring an explicit call to start_scripter, see example below (requires update).

    import ui
    from scripter import script, start_scripter
    
    mainview = ui.View(name='scripter_view', bg_color='black')
    start_scripter(mainview)
    
    ...
    

    @mikael, It works Perfect!
    Thanks for your help and work into it!

    posted in Pythonista read more
  • DavinE

    @mikael, here is a simple example:

    import ui
    from scripter import script
    from anchors import dock, size_to_fit, attach
    
    
    
    mainview = ui.View(name='scripter_view', bg_color='black')
    
    
    Label_1 = size_to_fit(ui.Label(name='Label_1', bg_color='red', text='nothing will happend'))
    dock(Label_1).top_center(mainview)
    
    Label_2 = size_to_fit(ui.Label(name='Label_2', bg_color='red', text='nothing will happend'))
    attach(Label_2).below(Label_1)
    
    Label_3 = size_to_fit(ui.Label(name='Label_3', bg_color='red', text='nothing will happend'))
    attach(Label_3).below(Label_2)
    
    @script
    def test():
        Label_1.text = 'okay'
        Label_1.bg_color = 'green'
        yield 2
        Label_2.text = 'okay'
        Label_2.bg_color = 'green'
        yield 2
        Label_3.text = 'okay'
        Label_3.bg_color = 'green'
        yield
    
    if __name__ == '__main__':
        mainview.present('fullscreen')
        test()
    

    the fist time it works perfect...
    then close the view and reopen the view... nothing will happened..
    you need to reopen Pythonista.

    hope this will help you out

    posted in Pythonista read more
  • DavinE

    @mikael, This looks great!
    but i don't know why this function in @script works and then it don't work....

    i used it in this way:

    from scripter import script
    
    @script
    def test(self, sender):
        if......:
            open_database()
            close_database()
            self.barcodeNumberCheckDisplayLabel.text = getText('datanormUpdateNONE', self.DEVICE)
            self.barcodeNumberCheckDisplayLabel.bg_color = getColor('selectionNONE')
            yield
        else:
            self.barcodeNumberCheckDisplayLabel.text = getText('datanormUpdateDONE', self.DEVICE)
            self.barcodeNumberCheckDisplayLabel.bg_color = getColor('selectionYES')
            yield
            
        if......:
            open_database()
            close_database()
            
            self.ebraNumberCheckDisplayLabel.text = getText('datanormUpdateNONE', self.DEVICE)
            self.ebraNumberCheckDisplayLabel.bg_color = getColor('selectionNONE')
            yield
        else:
            self.ebraNumberCheckDisplayLabel.text = getText('datanormUpdateDONE', self.DEVICE)
            self.ebraNumberCheckDisplayLabel.bg_color = getColor('selectionYES')
            yield
            
        if......:
            open_database()
            close_database()
            
            self.cuttingCheckDisplayLabel.text = getText('datanormUpdateNONE', self.DEVICE)
            self.cuttingCheckDisplayLabel.bg_color = getColor('selectionNONE')
            yield
        else:
            self.cuttingCheckDisplayLabel.text = getText('datanormUpdateDONE', self.DEVICE)
            self.cuttingCheckDisplayLabel.bg_color = getColor('selectionYES')
            yield
    

    is anything wrong on this ?

    EDIT: When i press the button sometimes it goes and sometimes it don't goes and nothing will happened...

    EDIT1: I know when the Problem is....
    I Open Pythonista... Run my App call the Function then i close my App and open it again... then it don't worked
    I need to reopen Pythonista then it works every Time.... but Why ?

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!