value=#Caller.getItem[attributes.type 'EasyFrame']#
Yes,... except that getItem is a query in the calling template,
So maybe value=#Caller.getItem[attributes.type
'EasyFrame'][Caller.getItem.currentRow]#
Not sure if it is more efficient, but certainly not as easy to read.
I have only ever used evaluate() in my CF code once. Every other time I
thought I needed it, I was able to use array notation to solve the problem.
On the flip side I once inherited an app that used evaluate() 839 times. On
one page, there were 93 instances of evaluate().
On Thu, Mar 19, 2009
Personally I think that the anti-evaluate slant is a bit of orthodoxy
that
was picked up on years ago (when it was much more computationally
expensive) and enforced as such by members of the CF community.
Right, and it is not proper to the CF community, I remember having the
same discussion
well personally i try to avoid evaluates too. it still is about the
computational expense.same with query of queries. the expense of QoQ can
be seen dramatically when there's looping involved. I remember when I first
started at this job, one of the components was doing a recursive
The one time I know we have to use it is because we have some database
tables where some fields actually have CF expressions in them, so to have
those expressions get, errr, evaluated, we have to use evaluate().
On Mar 19, 2009 8:10pm, Dave Watts dwa...@figleaf.com wrote:
In general,
Another way is to write them to a file and cfinclude it. But in this case I
think Evaluate might look nicer...
Adrian
-Original Message-
From: dsbr...@gmail.com [mailto:dsbr...@gmail.com]
Sent: 20 March 2009 15:37
To: cf-talk
Subject: Re: Re: How is this done without evaluate
I read that in CF8 evaluate() should no longer be necessary. If so, how
would you cleanly rewrite the code below without it?
I have a table populated with form field corresponding with records in a
table, each idendified by record id. Say I have the record ids in a list.
cfset
On Thu, Mar 19, 2009 at 17:18, Jim McAtee jmca...@mediaodyssey.com wrote:
I read that in CF8 evaluate() should no longer be necessary. If so, how
would you cleanly rewrite the code below without it?
I have a table populated with form field corresponding with records in a
table, each
Try this (not tested):
input type=text name=#id#_name value=#form[id'_name']#
I've done this in earlier versions of CF as well
Jake Churchill
CF Webtools
11204 Davenport, Ste. 100
Omaha, NE 68154
http://www.cfwebtools.com
402-408-3733 x103
Jim McAtee wrote:
I read that in CF8 evaluate()
#evaluate('form.#id#_name')# becomes #form[#id#_name]#
cheers,
barneyb
On Thu, Mar 19, 2009 at 2:18 PM, Jim McAtee jmca...@mediaodyssey.com wrote:
I read that in CF8 evaluate() should no longer be necessary. If so, how
would you cleanly rewrite the code below without it?
I have a table
I read that in CF8 evaluate() should no longer be necessary.
This is wrong. What is true is Should not be used if not necessary
Which by the way is your case here.
But there are more complex issues where it can't be avoided.
Dave gave you the answer.
PM
Subject: Re: How is this done without evaluate()?
I read that in CF8 evaluate() should no longer be necessary.
This is wrong. What is true is Should not be used if not necessary
Which by the way is your case here.
But there are more complex issues where it can't be avoided
Why Should not be used if not necessary?
Because, if it is not necessary, hen there is an alternative using []
and it is more effiecient,
although the difference may be a couple of miliseconds.
What would be an example where it's necessary?
For instance, I have this in a custom tag:
For instance, I have this in a custom tag:
VALUE=#evaluate('caller.getItem.' attributes.type 'EasyFrame')#
There might be a better way, but I got tired trying to figure it out.
value=#Caller.getItem[attributes.type 'EasyFrame']#
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
I must have been thinking about setVariable(). Why Should not be used if
not necessary? What would be an example where it's necessary?
In general, evaluating strings as expressions is computationally
expensive. I can't think of any cases where I've had to use it in
quite a while, but I
In general, evaluating strings as expressions is computationally
expensive. I can't think of any cases where I've had to use it in quite a
while, but I suspect there are some rare cases where you can't get what you
need any other way.
Personally I think that the anti-evaluate slant is a bit of
Opps. I posted an old version of the cfc. The new(er) one is in cfscript
damn... my bad... but the offer still holds to not use evaluate.
G!
Note to self must sleep. Sleep good.
On Thu, Mar 19, 2009 at 10:56 PM, Gerald Guido gerald.gu...@gmail.comwrote:
In general, evaluating
and its sloppy, newbie code
On Thu, Mar 19, 2009 at 9:40 PM, Dan Baughman dan.baugh...@gmail.comwrote:
Dudes... stfu evaluate can be avoided.
(notice the period).
.
thanks
dan
On Thu, Mar 19, 2009 at 9:28 PM, Gerald Guido gerald.gu...@gmail.comwrote:
Opps. I posted an old version
Dudes... stfu evaluate can be avoided.
(notice the period).
.
thanks
dan
On Thu, Mar 19, 2009 at 9:28 PM, Gerald Guido gerald.gu...@gmail.comwrote:
Opps. I posted an old version of the cfc. The new(er) one is in
cfscript
damn... my bad... but the offer still holds to not use
Some times it cannot be avoided with out a boat load of thinking and trial
and error. Case in point, and I will gladly change this bit of code to not
use evaluate if someone can figure out how to do this in CFscript sans the
evaluate function:
OK, I'll bite. It's certainly much more verbose, and
20 matches
Mail list logo