Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Correlations among VFP and OOP languages
Message
From
10/06/2006 05:27:29
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
01128092
Message ID:
01128260
Views:
19
>You can define abstract classes but there is no language enforcement that the methods remain empty.
True, but you can fake it (sort of...<g>)
function AbstractWarn()
  local lcSetAssert
  lcSetAssert = set("Assert")
  set Assert on
  assert .f. Message Program() + " should be overwritten !"
  set Assert &lcSetAssert

define class GraphicAbstractObject as custom
   x = 0
   y = 0

function moveTo( newX, newY )
  = AbstractWarn()
endfunc

function draw()
  = AbstractWarn()
endfunc

enddefine
regards

thomas
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform