RE: using dynamic variable in cfset statement

2008-09-10 Thread Adrian Lynch
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

Re: using dynamic variable in cfset statement

2008-09-10 Thread Raymond Camden
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.

RE: using dynamic variable in cfset statement

2008-09-10 Thread Adrian Lynch
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

RE: using dynamic variable in cfset statement

2008-09-10 Thread David Moore, Jr.
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.

RE: using dynamic variable in cfset statement

2008-09-10 Thread Mark Kruger
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

Re: using dynamic variable in cfset statement

2008-09-10 Thread Brad Wood
, 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

Re: using dynamic variable in cfset statement

2008-09-10 Thread Judah McAuley
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

using dynamic variable in cfset statement

2008-09-09 Thread Wally Randall
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

Re: using dynamic variable in cfset statement

2008-09-09 Thread Charlie Griefer
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:

Re: using dynamic variable in cfset statement

2008-09-09 Thread Claude Schneegans
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

Re: using dynamic variable in cfset statement

2008-09-09 Thread Justin Scott
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/

Re: using dynamic variable in cfset statement

2008-09-09 Thread Patrick Santora
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

Re: using dynamic variable in cfset statement

2008-09-09 Thread Wally Randall
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

RE: using dynamic variable in cfset statement

2008-09-09 Thread Dave Watts
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

Re: using dynamic variable in cfset statement

2008-09-09 Thread Charlie Griefer
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.

RE: using dynamic variable in cfset statement

2008-09-09 Thread Dave Watts
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,

Re: using dynamic variable in cfset statement

2008-09-09 Thread Patrick Santora
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

Re: using dynamic variable in cfset statement

2008-09-09 Thread Phillip Vector
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.

Re: using dynamic variable in cfset statement

2008-09-09 Thread Ian Skinner
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

RE: using dynamic variable in cfset statement

2008-09-09 Thread David Moore, Jr.
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.

Re: using dynamic variable in cfset statement

2008-09-09 Thread Patrick Santora
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

Re: using dynamic variable in cfset statement

2008-09-09 Thread Claude Schneegans
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

Re: using dynamic variable in cfset statement

2008-09-09 Thread Charlie Griefer
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#'

RE: using dynamic variable in cfset statement

2008-09-09 Thread David Moore, Jr.
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 together—at home, work, or on the go.

Re: using dynamic variable in cfset statement

2008-09-09 Thread Patrick Santora
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,

Re: using dynamic variable in cfset statement

2008-09-09 Thread Casey Dougall
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

Re: using dynamic variable in cfset statement

2008-09-09 Thread Charlie Griefer
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.

Re: using dynamic variable in cfset statement

2008-09-09 Thread Patrick Santora
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 :)

RE: using dynamic variable in cfset statement

2008-09-09 Thread David Moore, Jr.
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

Re: using dynamic variable in cfset statement

2008-09-09 Thread Ian Skinner
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

RE: using dynamic variable in cfset statement

2008-09-09 Thread David Moore, Jr.
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

RE: using dynamic variable in cfset statement

2008-09-09 Thread Bobby Hartsfield
: 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