Re: [ACFUG Discuss] Question about client variables and Evaluate()

2006-05-11 Thread Douglas Knudsen

wow, a page recompile?  first I heard that one.  hey, sometimes evils
can't be avoided, eh?  Like driving on the 400 at 5pm, sometimes you
just have to.  IIRC, the ability to reference client vars in structure
notation was introduced in CF6.  So in CF5, you are out of luck so to
speak.  Are you using a DB to store those client vars?  Maybe you can
read them via a query and stick them in a struct in the session or
something?

DK

On 5/11/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:



Hello all,

I've got a question regarding how to retrieve the value of a client variable
without using evaluate().  Before everyone bombards me with how evil
evaluate() is, let me just say I know!!!

Here's the situation - need to code that will work in both CF5 and MX (as it
is a mixed environment of servers for the time being).

We spoke to a macromedia rep and they stated that using evaluate() in MX
causes a page recompile which drastically hinders performance.  Is there any
way to reference a client variable that will work for both CF5 and MX
without using evaluate()?

Example:
cfset variableName = companyAddress

CF5 example:
cfoutput#Evaluate(client.#variableName#)#/cfoutput

MX example:
cfoutput#client[variableName]#/cfoutput

Is there a way to do it that will work for both without the evaluate?!

Thanks,

Allen
 *
To unsubscribe from this list, manage your profile @ * *
http://www.acfug.org?fa=login.edituserform * * * * For more
info, see http://www.acfug.org/mailinglists *




--
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?



* To unsubscribe from this list, manage your profile @ *
* http://www.acfug.org?fa=login.edituserform   *
*  *
* For more info, see http://www.acfug.org/mailinglists *





RE: [ACFUG Discuss] Question about client variables and Evaluate()

2006-05-11 Thread axunderwood
Title: Message



No, 
unfortunately it won't work...that's why the GetClientVariablesList() existed in 
5 and previous versionsif you could use it as a structure you would be able 
to do StructKeyList().

  -Original Message-From: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]On Behalf Of Philip ArnoldSent: 
  Thursday, May 11, 2006 11:25 AMTo: 
  discussion@acfug.orgSubject: RE: [ACFUG Discuss] Question about 
  client variables and Evaluate()
  Might sound strange, but I thought that CF5 allowed the [] notation on 
  scopes.
  
  I 
  know it didn't have the variables scope, but I'm pretty sure that it used the 
  client scope like this.
  
  

-Original Message-From: 
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of 
[EMAIL PROTECTED]Sent: 11 May 2006 13:17To: 
discussion@acfug.orgSubject: [ACFUG Discuss] Question about 
client variables and Evaluate()
Hello 
all,

I've got a 
question regarding how to retrieve the value of a client variable without 
using evaluate(). Before everyone bombards me with how evil evaluate() 
is, let me just say I know!!!

Here's the 
situation - need to code that will work in both CF5 and MX (as it is a mixed 
environment of servers for the time being).

We spoke to a 
macromedia rep and they stated that using evaluate() in MX causes a page 
recompile which drastically hinders performance. Is there any way to 
reference a client variable that will work for both CF5 and MX without using 
evaluate()?

Example:
cfset 
variableName = "companyAddress"

CF5 
example:
cfoutput#Evaluate("client.#variableName#")#/cfoutput

MX 
example:
cfoutput#client[variableName]#/cfoutput

Is there a way 
to do it that will work for both without the evaluate?!

Thanks,

Allen 
* To unsubscribe from this list, manage your profile @ * * 
http://www.acfug.org?fa=login.edituserform * * * * For more info, see 
http://www.acfug.org/mailinglists * 
 
   * To 
  unsubscribe from this list, manage your profile @ * * 
  http://www.acfug.org?fa=login.edituserform * * * * For more info, see 
  http://www.acfug.org/mailinglists * 
   






* To unsubscribe from this list, manage your profile @ *

* http://www.acfug.org?fa=login.edituserform   *

*  *

* For more info, see http://www.acfug.org/mailinglists *