House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home / Groups / ColdFusion Talk (CF-Talk)

ColdFusion & Polymorphism use

Author:
Dan O'Keefe
06/29/2012 06:01 PM

I have an animal object with a method call makeSound(). Then I have a feline object that extends animal with a method called makeSound(). Then I have an object named cat that extends feline with a method called makeSound(). If I instantiate the cat object and call it oCat, I can call oCat.makeSound() and get the cat sound. QUESTION IS, how do I call the makeSound() method in the feline object via the oCat handle? I am told it is possible but I have not been able to find out exactly how. I did read you need to pass a type reference to it but not sure what that means. Would it be oCat.makeSound(feline) ?? -------------- Dan O'Keefe


Search cf-talk

June 18, 2013

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
             1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30             

Designer, Developer and mobile workflow conference