evaluate() is still a cry for help

Line 169 of Entity.cfc from Blade 0.62 (an ORM example):

evaluate('this.set#local.property#(arguments.properties[local.property])');

Even with all the CF9 conventions this is still the only way to do it?

Comments
Mike Kelp's Gravatar Looks to me like you could easily use the cfinvoke tag. Then you get dynamic method calling like you are trying to do.

cfinvoke component="#this#" method="set#Local.property#"
cfinvokeargument value="#Arguments.properties['local.property']#"
/cfinvoke

Don't know if that will come through, but hope it helps. I know everyone is wiley about script these days, but I'm quite fond of the tags for reasons like these.
# Posted By Mike Kelp | 8/1/11 1:44 AM
Marco Betschart's Gravatar Hi Mark!

Glad to see you are exploring blade! :)

Unfortunately the evaluate-cry is the only one to achieve such dynamic method calls in cfscript. That's why I'm with Mike: There are a few things in cfscript which aren't possible yet, so generally I also prefer tags these days.

Nevertheless blade was my first "cfscript-only" outcome and since it's tend to act as "a new age rapid development framework" I had to investigate the cfscript possibilities in CF 9 :)

Hope you enjoy playing with blade and I would be happy about any response!
# Posted By Marco Betschart | 8/2/11 4:51 AM
BlogCFC was created by Raymond Camden. This blog is running version 5.9.1.002. Contact Blog Owner