Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trouble releasing form
Message
From
15/03/2005 07:45:35
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Novell 4.x
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00995436
Message ID:
00995880
Views:
23
This was my first guess too. I tried this (and a lot more), but there seems to be no reference hanging at all.

Besides, if you have a reference and you remove the object, the reference itself is being destroyed as well.
loForm = NEWOBJECT("Form")
loForm.AddObject("Test","Label")
loTest = loForm.test
loForm.RemoveObject("test")
?loTest.Name && This raises an error!
Also what is happening is, that the same code that is called from the button
THISFORM.DoProcess
works fine, and when using the key F10
ON KEY LABEL F10 _SCREEN.ACTIVEFORM.DoProcess()
the problem occurs. There must be a connection with the ON KEY, the code itself must be good.

>Christian,
>
>You can't get rid of an object while a reference to it is being held. Your loBatch is still pointing to the object you are trying to remove. Try making this small mod:
>
>
>local lcName
>FOR lnNr = lnNumberOfBatches TO 1 STEP -1
>	*
>	loBatch = THIS.TicketsDisplay.Controls[lnNr]
>	loBatch.DoCreateCertificate(lnBatchNr)
>      lcName = loBatch.NAME
>      loBatch = .null.
>	THIS.TicketsDisplay.REMOVEOBJECT( lcName )
>	*
>ENDFOR
>
>
>>I have trouble releasing a form, but I have no idea why. I checked for outstanding object references (Objref.exe), there are none.
Christian Isberner
Software Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform