Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need to nuke objects in Destroy?
Message
 
To
26/08/2009 12:15:36
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01405727
Message ID:
01420860
Views:
63
hi Matt,

>I'm hoping 2 seconds after I post this that someone will paste in the code they've already worked out to handle this. <g>

I leave it to you to add the code to actually set the property to NULL, though. *g*
		#IF __DEBUGLEVEL >= __DEBUG_ACTIVE
			Local lnProp, laProp[1], luValue, lcProp, lnItem
			For lnProp=1 to AMembers(laProp,This,1)
				If not laProp[m.lnProp,2] == "Property"
					Loop
				EndIf
				If not PemStatus(This,laProp[m.lnProp,1],PEM_USER_DEFINED)
					Loop
				EndIf
				If PemStatus(This,laProp[m.lnProp,1]+"_Access",PEM_EXIST)
					Loop
				EndIf
				lcProp = laProp[m.lnProp,1]
				If Type("Alen(This."+m.lcProp+")") == T_NUMERIC
					For lnItem=1 to Alen(this.&lcProp)
						luValue = This.&lcProp[m.lnItem]
						Assert not Vartype(m.luValue) $ T_OBJECT ASSMSG ;
							"Die Eigenschaft " + m.lcProp + "["+Transform(m.lnItem)+"] " + ;
							"enthält eine Objektreferenz. Sie muss in DoNullifyReferences() " + ;
							"auf NULL gesetzt werden."
					EndFor 
				Else
					luValue = GetPem(This,m.lcProp)
					Assert not Vartype(m.luValue) $ T_OBJECT ASSMSG ;
						"Die Eigenschaft " + m.lcProp + " enthält eine Objektreferenz. " + ;
						"Sie muss in DoNullifyReferences() auf NULL gesetzt werden."
				EndIf
			EndFor
		#ENDIF
--
Christof
Previous
Reply
Map
View

Click here to load this message in the networking platform