[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: Class newbie - How to

  • Thread starter Thread starter David Abdala
  • Start date Start date
Status
Not open for further replies.
D

David Abdala

Guest
Well.. no. An interface comes to play when you don´t care about "who", but "what". That means exactly the opposite to what you are posting. When you need some "services" (some specific functionallity) and you don't care about who provides it, then you use an interface that "someone else" provides: method public IDontCare(input ipifAnInterface as my.inteface.ISomeMethods): ipifAnIntefface:DoIt('yes!'). end method. In your case, you need inheritance: class Bong. end class. class Sharp inherits Bong: method public override ReadBong(): end class. class Lion inherits Bong: method public override ReadBong(). end class. class RealSharp inherits Sharp: end class. define variable myBong as Bong no-uno. myBong = NEW Sharp(). do on error undo, throw: ... finally delete object myBong no-error. end finally. end. myBong = NEW Lion(). do on error undo, throw: .. finaly: delete object myBong no-error. end finally. end. myBong = NEW RealSharp(). etc..

Continue reading...
 
Status
Not open for further replies.
Back
Top