My Secret Life as a Spaghetti Coder
home | about | contact | privacy statement
I'm either an idiot, or a moron. But, I have courage and that's what matters. Let me explain:

Ever since I started messing with inheritance with CFCs in Coldfusion, I have lamented the "fact" they didn't have a way to override a parent's method while retaining the functionality via a call to super.methodInQuestion(). I got so sick of it, in fact, I came up with this brilliant way to re-use code and not repeat myself - I'd have component Parent with methods foo(arg1, arg2) and theRealFoo(arg1, arg2) where foo() simply called theRealFoo() with the arguments it had been passed. Following me so far?

Then in component Child, when I needed to slightly modify the behavior of foo() and still use its code, I could simply do so by calling theRealFoo() within my Child version of the method. Sweet!

Of course I had tried using super, but I kept getting this strange error:

Error Occurred While Processing Request

Cannot invoke method method1 on an object of type coldfusion.runtime.Struct with named arguments.

Use ordered arguments instead.


What? I wasn't trying to invoke a method on a struct, was I? I thought this was just one of those random CF errors that get thrown which seem to have nothing to do with the problem, especially since it was right there in big bold letters. I never read the fine print.

Well, since then I had read that it did exist, and I tried again - but got the same error. I came to the conclusion that it became part of the language in version 7.0, since I don't yet have it. And lately I've been reading and writing with the Gurus on the CFCDev mailing list, and I finally decided to ask: Am I a moron or is there no super in CF6.1? Well, as it turns out, I am a moron. I should have read the fine print.

Hey! Why don't you make your life easier and subscribe to the full post or short blurb RSS feed? I'm so confident you'll love my smelly pasta plate wisdom that I'm offering a no-strings-attached, lifetime money back guarantee!


Comments
Leave a comment

There are no comments for this entry yet.

Leave a comment

Leave this field empty
Your Name
Email (not displayed, more info?)
Website

Comment:

Subcribe to this comment thread
Remember my details
Google
Web CodeOdor.com

Me
Picture of me

Topics
.NET (19)
AI/Machine Learning (14)
Answers To 100 Interview Questions (10)
Bioinformatics (2)
Business (1)
C and Cplusplus (6)
cfrails (22)
ColdFusion (78)
Customer Relations (15)
Databases (3)
DRY (18)
DSLs (11)
Future Tech (5)
Games (5)
Groovy/Grails (8)
Hardware (1)
IDEs (9)
Java (38)
JavaScript (4)
Linux (2)
Lisp (1)
Mac OS (4)
Management (15)
MediaServerX (1)
Miscellany (76)
OOAD (37)
Productivity (11)
Programming (168)
Programming Quotables (9)
Rails (31)
Ruby (67)
Save Your Job (58)
scriptaGulous (4)
Software Development Process (23)
TDD (41)
TDDing xorblog (6)
Tools (5)
Web Development (8)
Windows (1)
With (1)
YAGNI (10)

Resources
Agile Manifesto & Principles
Principles Of OOD
ColdFusion
CFUnit
Ruby
Ruby on Rails
JUnit



RSS 2.0: Full Post | Short Blurb
Subscribe by email:

Delivered by FeedBurner