On 26/11/2014 at 04:53, xxxxxxxx wrote:
Hello Sebastian,
thanks for you reply - I try that :
class RB_Client(c4d.threading.C4DThread) :
def Main(self) :
u = urlopen('url')
...
while True:
buffer = u.read(block_size)
if not buffer:
break
message2 = str(round(float(downloaded_bytes)/file_size*100-0.5))+" %"
UpdaterDialog.progressmessage = message2
c4d.SpecialEventAdd(betaupdatefunction_ID)
f.close()
pass
Cthread = RB_Client()
Cthread.Start(mode=c4d.THREADMODE_ASYNC, priority=c4d.THREADPRIORITY_NORMAL)
Cthread.Wait(False)
def CoreMessage(self, id, msg) :
if id==betaupdatefunction_ID:
self.SetString(1005,self.progressmessage)
self.LayoutChanged(1006)
return True
return gui.GeDialog.CoreMessage(self, id, msg)
the dialog refresh after the end of the function not during the while