Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Anyone else losing object references during runtime?
Message
From
03/10/1998 10:38:35
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00140817
Message ID:
00143577
Views:
27
>I have had similiar object references getting lost. For example in the following code the RemoveObject will fail once in a while--object reference is not found, or similiar message. However, it is **very** rare, and I can never repoduce it.
>
>=AMEMBERS(gaPropArray, THISFORM, 2)
>
>* Loop through the array of name objects
>FOR i = 1 TO ALEN(gaPropArray,0)
> * Check if the container screen is already defined
> IF UPPER(ALLTRIM(gaPropArray[i])) = "CNTSCREEN"
> * The container screen object is defined, so remove it
> THISFORM.RemoveObject("CNTSCREEN")
> ENDIF
>ENDFOR
>

This may be similar to releasing all forms in a loop... try to scan the array FOR i = ALEN(gaPropArray,0) TO 1 STEP -1, or to recreate the array every time you remove an object and start over again.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform