Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Child class in code does not contain method from parent
Message
From
17/06/2004 04:19:15
Thomas Ganss (Online)
Main Trend
Frankfurt, Germany
 
 
To
16/06/2004 21:52:58
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00914483
Message ID:
00914545
Views:
12
Hi,

shouldn't be a problem. What overriding in vfp is, should become clear now:
local li
lo = CREATEOBJECT("overSuper")
lo = CREATEOBJECT("SubSub")
lo = CREATEOBJECT("SubDoDef")
lo = CREATEOBJECT("SubEmpty")
lo = CREATEOBJECT("SubComm")
lo = CREATEOBJECT("SubDef_in")
lo = CREATEOBJECT("SubDef_out")


DEFINE CLASS oversuper as Custom
	lFlag = .f.
	FUNCTION init
		this.lFlag = .t.
	ENDFUNC

	FUNCTION destroy
		? PADR(this.Class, 12) + ;
			IIF(this.lFlag, "All Ok", "has a problem")
	endfunc
ENDDEFINE

DEFINE CLASS subSub as oversuper
	FUNCTION init
		RETURN DODEFAULT()
	endfunc
ENDDEFINE

DEFINE CLASS subDoDef as oversuper
	FUNCTION init
		RETURN DODEFAULT()
	endfunc
ENDDEFINE

DEFINE CLASS subEmpty as oversuper
	FUNCTION init
	endfunc
ENDDEFINE

DEFINE CLASS subComm as oversuper
	FUNCTION init
		*
	endfunc
ENDDEFINE

DEFINE CLASS subdef_in as oversuper
	FUNCTION init
		#if .f.
		#endif
	endfunc
ENDDEFINE

DEFINE CLASS subdef_out as oversuper
	#if .f.
		FUNCTION init
		endfunc
	#endif
enddefine
HTH

thomas
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform