[progress Communities] [progress Openedge Abl] Forum Post: Re: Ooabl Upcasting

  • Thread starter Thread starter Thomas Mercer-Hursh
  • Start date Start date
Status
Not open for further replies.
T

Thomas Mercer-Hursh

Guest
Why do you need to cast or new anything. Any subclass can be treated as one of its superclasses as long as one confines oneself to the methods and properties of the superclass. E.g., one can have a method in some class which has a parameter defined as the superclass and then call that method passing in any of the subclasses of that superclass. And, as has been hinted, one can define the message in terms of an interface and pass in any object which supports that interface.

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