Pythonista-Issues
Pythonista-Issues copied to clipboard
Change label.text but no Update
Hi,
i am changing the "label1.text" with this function, but on my view it is not updated? Can you tell me how to activate an update of the view?
Thanks a lot.
BR kami
` def swswitch (sender): if main['connectsw'].value == True:
main['label1'].text = " Waiting..."
#main.update()
cb.scan_for_peripherals()
count = time.time()
while not mngr.peripheral and count >= time.time()-10:
pass
if mngr.peripheral == None:
main['label1'].text = " Device not found..."
main['connectsw'].value = False
cb.stop_scan()
else:
#v['viewbottom']['label1'].text = " Disconnected..."
if mngr.peripheral != None:
cb.cancel_peripheral_connection(mngr.peripheral)
pass
`