more-serious-face
I didn't!
/more-serious-face
:OD
-Original Message-
From: Charlie Griefer [mailto:[EMAIL PROTECTED]
serious face
there's probably not one of us on this list that didn't used to use
evaluate() before being taught to look at other alternatives (and i'm sure
some
As someone who used to always pounce on folks for using evaluate, I
believe I remember reading recently a blog entry from an Adobian that
points out that evaluate is not nearly as slow as it used to be.
Now when I recommend against Evaluate I do so on readability terms
rather than performance.
Good thing my names Adrian then! :O.
-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED]
Sent: 10 September 2008 14:33
To: CF-Talk
Subject: Re: using dynamic variable in cfset statement
As someone who used to always pounce on folks for using evaluate, I
believe I remember
I hope no one Evaluates() this thread or I'll get a CF- ;).~David
_
Get more out of the Web. Learn 10 hidden secrets of Windows Live.
Ray,
As I recall no evaluate( ) used to be engraved on your family crest. How
times have changed :)
-mark
-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 10, 2008 8:33 AM
To: CF-Talk
Subject: Re: using dynamic variable in cfset statement
, September 10, 2008 8:33 AM
Subject: Re: using dynamic variable in cfset statement
As someone who used to always pounce on folks for using evaluate, I
believe I remember reading recently a blog entry from an Adobian that
points out that evaluate is not nearly as slow as it used to be.
Now when I
witch-hunt mentality is a little obtuse. :)
~Brad
- Original Message -
From: Raymond Camden [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: Wednesday, September 10, 2008 8:33 AM
Subject: Re: using dynamic variable in cfset statement
As someone who used to always
Why does this fail inside a cfoutput loop over a query:
cfset application.#appconfig.code_name# = '#appconfig.code_value#'
It generates this message:
A CFML variable name cannot end with a . character.
The variable application. ends with a . character. You must supply an
additional structure
try cfset application[appconfig.code_name] = appconfig.code_value /
On Tue, Sep 9, 2008 at 1:53 PM, Wally Randall [EMAIL PROTECTED]wrote:
Why does this fail inside a cfoutput loop over a query:
cfset application.#appconfig.code_name# = '#appconfig.code_value#'
It generates this message:
The variable application. ends with a . character.
This looks to me like appconfig.code_name is an empty string.
~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
Why does this fail inside a cfoutput loop over a query:
cfset application.#appconfig.code_name# = '#appconfig.code_value#'
It sounds like one of your code_name values is blank or null, resulting
in an invalid variable name.
--
Justin Scott, http://www.tlson.com/
Charlie has the idea. It's because you are referring to a variable contained
within an structure and doing dynamic dot notation has it's issues and will
not work in this case.
-Pat
On Tue, Sep 9, 2008 at 1:57 PM, Charlie Griefer
[EMAIL PROTECTED]wrote:
try cfset
The variable application. ends with a . character.
This looks to me like appconfig.code_name is an empty string.
It is not an empty string. Also, the [] is an invalid constrict in
coldfusion.
~|
Adobe® ColdFusion® 8
Why does this fail inside a cfoutput loop over a query:
cfset application.#appconfig.code_name# = '#appconfig.code_value#'
It has nothing to do with the query. To set a variable whose name isn't
known until runtime, you have three options:
1. The syntax in Charlie's email - my preference out
On Tue, Sep 9, 2008 at 2:01 PM, Wally Randall [EMAIL PROTECTED]wrote:
Also, the [] is an invalid constrict in coldfusion.
could you elaborate on that please?
--
I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.
Also, the [] is an invalid constrict in coldfusion.
That hasn't been true since CF 4.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore,
So are you saying:
cfset application[appconfig.code_name] = '#appconfig.code_value#'
or even
cfset application.#appconfig.code_name# = '#appconfig.code_value#'
does not work? The second example with quotes around the set variable should
also work I believe.
-Pat
On Tue, Sep 9, 2008 at 2:01
Not in this case. The []'s will work.
On 9/9/08, Wally Randall [EMAIL PROTECTED] wrote:
The variable application. ends with a . character.
This looks to me like appconfig.code_name is an empty string.
It is not an empty string. Also, the [] is an invalid constrict in
coldfusion.
Wally Randall wrote:
Why does this fail inside a cfoutput loop over a query:
application. is an illegal variable name. To do this type of thing
you need to use array notation.
cfset application[appconfig.code_name] = appconfig.code_value
Would something like this work?
cfset Evaluate(application.#appconfig.code_name#) = '#appconfig.code_value#'
~ David Moore
_
Get more out of the Web. Learn 10 hidden secrets of Windows Live.
Ouch! Evaluate
On Tue, Sep 9, 2008 at 2:15 PM, David Moore, Jr. [EMAIL PROTECTED]wrote:
Would something like this work?
cfset Evaluate(application.#appconfig.code_name#) =
'#appconfig.code_value#'
~ David Moore
_
Get more
Also, the [] is an invalid constrict in coldfusion.
well, if appconfig.code_name is an empty string, then
[appconfig.code_name] will be equivalent to [], which is an invalid
constrict in coldfusion.
If I were you, I'll really make sure appconfig.code_name is not an empty
string ;-)
Just try
hehe :)
On Tue, Sep 9, 2008 at 2:18 PM, Patrick Santora [EMAIL PROTECTED] wrote:
Ouch! Evaluate
On Tue, Sep 9, 2008 at 2:15 PM, David Moore, Jr. [EMAIL PROTECTED]
wrote:
Would something like this work?
cfset Evaluate(application.#appconfig.code_name#) =
'#appconfig.code_value#'
I just love giving you guys something to laugh at ... Rag the newbie... It's
OK. At least I am learning, and trying. :) hehe :) Ouch! Evaluate
_
See how Windows Mobile brings your life togetherat home, work, or on the go.
It's sometimes the best and fastest way to learn :-).
Evaluate works, it's just not really recommended Ouch. ;-)
On Tue, Sep 9, 2008 at 2:27 PM, David Moore, Jr. [EMAIL PROTECTED]wrote:
I just love giving you guys something to laugh at ... Rag the newbie...
It's OK. At least I am learning,
On Tue, Sep 9, 2008 at 4:53 PM, Wally Randall [EMAIL PROTECTED]wrote:
Why does this fail inside a cfoutput loop over a query:
cfset application.#appconfig.code_name# = '#appconfig.code_value#'
It generates this message:
A CFML variable name cannot end with a . character.
The variable
hey i was laughing at patrick laughing at you, not laughing at you directly,
so it's ok :)
serious face
there's probably not one of us on this list that didn't used to use
evaluate() before being taught to look at other alternatives (and i'm sure
some who still do use it). it's all good.
laughingIt's kind of like a right of passage/laughing
It just looks to tempting to use sometimes :-)
Well said Charlie.
On Tue, Sep 9, 2008 at 2:33 PM, Charlie Griefer
[EMAIL PROTECTED]wrote:
hey i was laughing at patrick laughing at you, not laughing at you
directly,
so it's ok :)
Pat wrote: It's sometimes the best and fastest way to learn :-). Evaluate
works, it's just not really recommended Ouch. ;-)
Yes. It's just painful to the character of ones soul.
I didn't know that about Evaluate. Glad I do know that...now.
I wish there was an asterisks next to code
Casey Dougall wrote:
cfloop index=ColumnName list=#appconfig.ColumnList#
cfset APPLICATION.appconfig.#ColumnName# = appconfig[#ColumnName#]
/cfloop
Or the same thing with a few less pound signs and quotes.
cfset Application['appconfig'][ColumnName] = appconfig[ColunName]
Or to completely
Charlie wrote: hey i was laughing at patrick laughing at you, not laughing at
you directly, so it's ok :)
Oh, I'm cool. I worked in Radio for 15 years as a DJ, so I don't expect a whole
lot out of myself. I thought it was funny too. :)
~David
: using dynamic variable in cfset statement
laughingIt's kind of like a right of passage/laughing
It just looks to tempting to use sometimes :-)
Well said Charlie.
On Tue, Sep 9, 2008 at 2:33 PM, Charlie Griefer
[EMAIL PROTECTED]wrote:
hey i was laughing at patrick laughing at you, not laughing
32 matches
Mail list logo