Hi Aaron,

See comments below.

On 5/4/07 12:56 PM, "Aaron Roberson" <[EMAIL PROTECTED]> wrote:

> Yes Peter, purely syntactic sugar. However, I think that syntax is
> just as important to you as it is to me :)

For sure!

> Just so that we are all on the same page, here is the methods from
> Hal's baseComponent.cfc class:
> . . . Snip . . .
> As you can see, the set method checks to see if
> set#arguments.propertyName# exists and if it does it invokes it. Is
> this checking if a method named set#arguments.propertyName# exists in
> the child method or in the base component? The reference to this has
> me thinking it could be the latter (and then I searched to find out,
> got more confused, posted this thread, and you know the rest), but
> what do I know?

It is seeing whether the method exists in the bean that was called (or any
of its ancestors in its inheritance tree). That is easy to do. The thing you
can't do (without code gen as Sam pointed out) is to actually call
getUserName() unless there really is a getUserName() method somehow,
somewhere which is why this syntactic sugar isn't really worth the trouble
in CF even though it is nice to have in languages that support it. You'd
either have to wait for CF to add a missing method handler or you'd have to
start genning a bunch of methods that'd just lie around cluttering your code
base up. Personally I'd leave that to the enterprise Java guys. They've got
enough clutter anyway with all the hacks to handle static typing and those
big ole XML config files *winks-and-then-runs-for-cover*:->

Best Wishes,
Peter





You are subscribed to cfcdev. To unsubscribe, please follow the instructions at 
http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

An archive of the CFCDev list is available at 
www.mail-archive.com/cfcdev@cfczone.org

Reply via email to