seems a bit muddled... you're always going to get methods of the current class (overridden or inherited) if you use variables.method(), this.method() or method() to call the method. Super.method() allows you to invoke a method of the parent class.
So... technically polymorphism (forgive me if my memory is a bit rusty) is the ability to use subclasses with different functionality interchangeably... So, if you have another class which needs an object of type Ball to perform its function, it can use any sub-class of Ball which will have overridden methods, such as RubberBall.bounce() (which returns "high"), CannonBall.bounce() which returns "Yar!", or CheeseBall.bounce() which returns "splat". Am I missing something? (Other than the fact that I think if you specify <cfargument type="Ball"> it won't accept an object of type RubberBall, in which case I'd just omit the type argument. Conceptually a bit sloppy perhaps, but it's not a big issue for me.) Imo most of the functionality is there (sans interfaces) although some of it isn't as nice as it could be. > That's not polymorphism, that's overriding. While it's a > big part of > polymorphism, that's not all of it (at least in my own > view of what > polymorphism is...). However, I was wrong in my statement, > anyway - > <insert foot in to mouth>. A CFMX book I've been reading > talked about > how a parent class can invoke a subclass' overridden > method by > prepending the function call with "this.". This led me to > believe that > if you didn't prepend "this" to the function call the > parent's function > would be called rather than the child's overridden > function (this, of > course, assumes you're using an instance of the child > cfc). However, > after testing this in actual code I see this is wrong. > Bob >>>> [EMAIL PROTECTED] 4/25/2005 2:44:35 PM >>> >>>While I like the concept of CFCs and think >>>it's a great addition they lack of some OO capabilities >>>(polymorphism, overloading methods, etc) that limit what >>>you can do with them. ColdFusion, for all intensive >>>purposes, is a procedural language. > Why do you say CF lacks polymorphism? > parentClass.draw() = circle > -> descendantClass.draw() = square > That's polymorphism is it not? > Overloaded methods in my experience are reasonably easy to > simulate > with optional arguments, functions that accept variable > argument > types, slightly altered method names (getPropertyByID() - > getPropertyByName()), etc. No it's not technically > overloading, but it > accomplishes the same ends and is in my experience no more > difficult > to implement. > That being said, yes ColdFusion has procedural roots, and > personally > I'm still not entirely happy with it's OO implementation, > but not for > these two reasons (or for the lack of interfaces). s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://macromedia.breezecentral.com/p49777853/ http://www.sys-con.com/author/?id=4806 http://www.fusiontap.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:204561 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

