Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Thermometer doesn't want to release!!!!!
Miscellaneous
Thread ID:
00528735
Message ID:
00528735
Views:
59
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:
*--------------------------------------------------------------------------
* -- Parsing Process for OStreet field and Pstreet field in BLDMSTR table
*--------------------------------------------------------------------------
select BldMstr
local lnRecno, lcOrder
lnRecno=recno()
lcOrder=order()
with thisform
    .lockscreen=.t.
	if .ProcParse()
	   .lockscreen=.f.
		if not .editmode		&& If already in Editmode then Just Save
			.navstand.cmdEdit.click()		&& In Edit Mode
		endif
		.add() && Save changes
		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			&& Do nothing if proctype is not PrclProc
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
Next
Reply
Map
View