@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 ?