Hi everybody,
I'm running some process (scan a table) with the thermometer (standard class from _ftc) shown. After the process is completed, the thermometer doesn't release! It also doesn't update properly, even if I invoke its Complete() method (e.g. label shows 100%, but there is a space at the end).
Here is the command button code, which invokes this method:
select BldMstr
local lnRecno, lcOrder
lnRecno=recno()
lcOrder=order()
with thisform
.lockscreen=.t.
if .ProcParse()
.lockscreen=.f.
if not .editmode
.navstand.cmdEdit.click()
endif
.add()
if .ProcType='prclproc' and .SubProc='ppsitus'
.cmdShowAddress.visible=.t.
endif
goto m.lnRecno
endif
endwith
if !empty(m.lcOrder)
set order to (m.lcOrder)
else
set order to
endif
thisform.grdBldMstr.SetFocus()
thisform.lockscreen=.f.
And here is the last lines of code in ProcParse() method: (BTW, I have the same situation with other buttons and methods too):
endscan
endif
endwith
set message to 'Process is complete...'
loTherm.complete()
if vartype(loTherm)='O'
loTherm.release()
endif
release loTherm
where loTherm was declared as local and instantiated with
loTherm = newobject("thermometer", "wg","","Calculating Progress for:" + m.lcTitle, ;
m.lnReccount)
loTherm.show()
I was trying couple of ideas already (haven't tried sleep function yet), but the thermometer get relased only after TableUpdate() finished its work (wich takes time). I want it to release immediatelly.
Do you know, what's wrong?
Thanks in advance.
If it's not broken, fix it until it is.
My Blog