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

  • Thread starter Thread starter Patrick Tingen
  • Start date Start date
Status
Not open for further replies.
P

Patrick Tingen

Guest
Exactly, you can create a static method in the Bong class that will return the right subtype for you, something like: CLASS Bong: METHOD PUBLIC STATIC Bong newBong(pcType AS CHARACTER): CASE pcType: WHEN 'Quorior' THEN RETURN NEW QuoriorBong(). WHEN 'Sharp' THEN RETURN NEW SharpBong(). END CASE. END METHOD. END CLASS.

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