Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot clear object because object is in use..
Message
De
12/01/2007 19:49:28
 
 
À
12/01/2007 19:13:02
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6
Divers
Thread ID:
01185291
Message ID:
01185299
Vues:
12
Hi Hilmar,

Can you help me with this? I have a button in my main form that does the thisform.release, but it won't release the form and no error is displayed by foxpro.

In that main form, I have another button that brings another form. In that second form, I have this method in the init.
local lvalue, tvalue
local cimgname
local lndistance, lnimgwidth, lnformwidth
local ncount

ncount=0
sele csrtable
go top
chroot=ch

lnpictperrow   = min(floor(thisform.width / 75), chroot)
lnspacebetween = (thisform.width - lnpictperrow * 75) / (lnpictperrow+1)
lnleft         = lnspacebetween

thisform.root.picture=locfle
thisform.root.left=(thisform.width-75)/2
thisform.root.tooltiptext=alltrim(empname)+', '+alltrim(pos)

if .not. eof()
	skip
	do while .not. eof()
		tvalue = thisform.root.top+90
		
		cimgname = alltrim(csrkey)
		thisform.addobject(cimgname, 'Image')

		with evaluate('thisform.' + cimgname)
			.visible=.t.
			.stretch=1
			.width=75
			.height=75
			.top=tvalue
			.left=lnleft
			.picture=locfle
			.borderstyle=1
			.tooltiptext=alltrim(empname)+iif(!empty(empname),', ','')+alltrim(pos)
		endwith
		lnleft = lnleft + 75 +lnspacebetween

		skip
	enddo
endif

sele csrtable
goto 2
do while .not. eof()
	chroot=ch
	if chroot!=0
	
		if chroot>13
		
		endif
		cimgroot = alltrim(csrkey)
		lnleft = evaluate('thisform.' + cimgroot + '.left')

		tvalue = evaluate('thisform.' + cimgroot + '.top') + 90
		lntop = tvalue
		
		select * from treeview where crelative=cimgroot ;
			into cursor csrchild
		go top
		do while .not. eof()
			cimgname = alltrim(ckey)
			thisform.addobject(cimgname, 'Image')
			ncount=ncount+1

			if chroot=1
*				lntop = lntop + 120
			else
				if mod(recno(),2)=1
					lnleft = evaluate('thisform.' + cimgroot + '.left') - 40
				else
					lnleft = evaluate('thisform.' + cimgroot + '.left') + 40
				endif
			endif

			with evaluate('thisform.' + cimgname)
				.visible=.t.
				.stretch=1
				.width=75
				.height=75
				.top=lntop
				.left=lnleft
				.borderstyle=1
			endwith
			sele employee
			go top
			locate for ckey=cimgname
			if found()
				with evaluate('thisform.' + cimgname)
					.picture = locfle
					.tooltiptext=alltrim(name)+iif(!empty(name),', ','')+alltrim(position)
				endwith
			endif
			sele csrchild
			skip
			if mod(recno(),2)=1
				lntop=lntop+80
			endif
		enddo
	else
	endif
	sele csrtable
	skip
enddo
Where do you think is the line that causes the release() not to release the form?

TIA.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform