Re: How would I code this line?

2006-08-26 Thread Denny Valliant
On 8/26/06, Bobby Hartsfield <[EMAIL PROTECTED]> wrote:
>
> Are you serious? People... get a grip and stop being so anal. It's not my
> code so I'm allowed to be lazy and not scope it since it's basically
> pseudo.
> It showed the process of piecing the variables together regardless of what
> they were or how they were scoped. I'm sure the original poster knows what
> scopes they are in and will apply them where they need to.


I wasn't commenting on your lack of scope, Bobby. :-)

I've got some of the worst habits, so no judgement over here. 't'was a bad
joke.

Comment was more about explicit and implicit coding, and the DRY idea.

While looping over a query, does everyone do daQuery["theCol"][
daQuery.currentrow]
when they reference their fields?  Seems the only safe way of doing it,
but MAN does it make stuff hard to read.  Take this example:

someVar = ((x * y) / z) * someVar;

variables.someVar = ((theQuery["x"][theQuery.currentrow] * theQuery["y"][
theQuery.currentrow]) / theQuery["z"][theQuery.currentrow]) *
variables.someVar;

Zaphod showed the "better way" (a short "pointer"), but still, here you've
got
Adobe saying explicit scoping is best practice, yet no examples are scoped,
or, if so, it's like 1 out of 500 ;). It makes it hard for a newb to follow
best
practice when it's not really followed in the docs.

On-list, pseudo is fine and dandy, but not in livedoc examples, if ya ask
me.

That increases the divide 'tween CFers. It's like you have to already know,
to know.

But implicit and explicit is something all languages have to deal with,
which is
more of what I was getting at.  I'm not sure which is really "better", it
seems like
there are parts of both in everything. Bleh. More clarity from the denstar,
eh?

Pearls, real pearls. :-))


~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251158
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: How would I code this line?

2006-08-26 Thread Robertson-Ravo, Neil (RX)
Lol.






"This e-mail is from Reed Exhibitions (Oriel House, 26 The Quadrant,
Richmond, Surrey, TW9 1DL, United Kingdom), a division of Reed Business,
Registered in England, Number 678540.  It contains information which is
confidential and may also be privileged.  It is for the exclusive use of the
intended recipient(s).  If you are not the intended recipient(s) please note
that any form of distribution, copying or use of this communication or the
information in it is strictly prohibited and may be unlawful.  If you have
received this communication in error please return it to the sender or call
our switchboard on +44 (0) 20 89107910.  The opinions expressed within this
communication are not necessarily those expressed by Reed Exhibitions." 
Visit our website at http://www.reedexpo.com

-Original Message-
From: Bobby Hartsfield
To: CF-Talk
Sent: Sat Aug 26 13:53:51 2006
Subject: RE: How would I code this line?

Are you serious? People... get a grip and stop being so anal. It's not my
code so I'm allowed to be lazy and not scope it since it's basically pseudo.
It showed the process of piecing the variables together regardless of what
they were or how they were scoped. I'm sure the original poster knows what
scopes they are in and will apply them where they need to.

...:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com

 


-Original Message-
From: Denny Valliant
To: CF-Talk
Sent: Sat Aug 26 03:37:28 2006
Subject: Re: How would I code this line? 


-Original Message-
From: Denny Valliant [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 25, 2006 10:37 PM
To: CF-Talk
Subject: Re: How would I code this line?


-- 

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.11.6/428 - Release Date: 8/25/2006
 





~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251133
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: How would I code this line?

2006-08-26 Thread Bobby Hartsfield
Are you serious? People... get a grip and stop being so anal. It's not my
code so I'm allowed to be lazy and not scope it since it's basically pseudo.
It showed the process of piecing the variables together regardless of what
they were or how they were scoped. I'm sure the original poster knows what
scopes they are in and will apply them where they need to.

..:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com

 


-Original Message-
From: Denny Valliant
To: CF-Talk
Sent: Sat Aug 26 03:37:28 2006
Subject: Re: How would I code this line? 


-Original Message-
From: Denny Valliant [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 25, 2006 10:37 PM
To: CF-Talk
Subject: Re: How would I code this line?


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.11.6/428 - Release Date: 8/25/2006
 



~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251129
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: How would I code this line?

2006-08-26 Thread Robertson-Ravo, Neil (RX)
Why shouldn't you need to scope?  I think you should always scope - even
variable.







"This e-mail is from Reed Exhibitions (Oriel House, 26 The Quadrant,
Richmond, Surrey, TW9 1DL, United Kingdom), a division of Reed Business,
Registered in England, Number 678540.  It contains information which is
confidential and may also be privileged.  It is for the exclusive use of the
intended recipient(s).  If you are not the intended recipient(s) please note
that any form of distribution, copying or use of this communication or the
information in it is strictly prohibited and may be unlawful.  If you have
received this communication in error please return it to the sender or call
our switchboard on +44 (0) 20 89107910.  The opinions expressed within this
communication are not necessarily those expressed by Reed Exhibitions." 
Visit our website at http://www.reedexpo.com

-Original Message-
From: Denny Valliant
To: CF-Talk
Sent: Sat Aug 26 03:37:28 2006
Subject: Re: How would I code this line?

On 8/25/06, Bobby Hartsfield <[EMAIL PROTECTED]> wrote:
>
> 
> 
> 
> 


Sure that LOOKS readable, but you know CF will be running around
trying to figure out which "first_name" field you're referring to.

Or you could find out which scopes CF checks first, I guess, but that's
not as nifty.  Sorta relying on the drum spinning round 'stead of the
program, sota speak.  Hmmm maybe nifty-er, from perspective B. =]

(personal gripe: I 90% don't use variables.somevar notation, mostly
cus it's freaking hard to read the code when every var is scoped.)

Or that might just be some old info, and scoping isn't so "in" now?

Staying hungry, yeah, that's it. ;-)  Guess I shoulda read that last
post about how the vars are passed around in CF more carefuller,
neh? Goes in one ear.. right out the other. I swear!

Seriously, scoping vars kind of bugs me. Shouldn't have to do it all
the time for a Best Practice- or else make the scope names shorter. ;-P

/end of denopinion ranthology & with apologies about clarity, lackthereof.




~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251121
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: How would I code this line?

2006-08-25 Thread Zaphod Beeblebrox







On 8/25/06, Rick Faircloth <[EMAIL PROTECTED]> wrote:
> My goal is to get rid of the comma after the Client_Last_Name, unless
> there is a Client_Name_Suffix.
>
> 
> '#Get_New_Client.Client_First_Name# 
> #Get_New_Client.Client_Middle_Name# 
> #Get_New_Client.Client_Last_Name#
>
> 
>
> , #Get_New_Client.Client_Name_Suffix#
>
> 
>
> '>
>
> This is all one line with no spaces, but I separated the parts
> to make it easier to read.what am I doing wrong?
>
> Can I use the CFIF in the middle of the CFSET like that or should I do this:
>
> 
> '#Get_New_Client.Client_First_Name# 
> #Get_New_Client.Client_Middle_Name# 
> #Get_New_Client.Client_Last_Name#'
>
> 
>
> 
>
> 
>
> Rick
>
>
>
> 

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251113
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: How would I code this line?

2006-08-25 Thread Denny Valliant
On 8/25/06, Bobby Hartsfield <[EMAIL PROTECTED]> wrote:
>
> 
> 
> 
> 


Sure that LOOKS readable, but you know CF will be running around
trying to figure out which "first_name" field you're referring to.

Or you could find out which scopes CF checks first, I guess, but that's
not as nifty.  Sorta relying on the drum spinning round 'stead of the
program, sota speak.  Hmmm maybe nifty-er, from perspective B. =]

(personal gripe: I 90% don't use variables.somevar notation, mostly
cus it's freaking hard to read the code when every var is scoped.)

Or that might just be some old info, and scoping isn't so "in" now?

Staying hungry, yeah, that's it. ;-)  Guess I shoulda read that last
post about how the vars are passed around in CF more carefuller,
neh? Goes in one ear.. right out the other. I swear!

Seriously, scoping vars kind of bugs me. Shouldn't have to do it all
the time for a Best Practice- or else make the scope names shorter. ;-P

/end of denopinion ranthology & with apologies about clarity, lackthereof.


~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:25
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: How would I code this line?

2006-08-25 Thread Bobby Hartsfield
Missed a '&' before middle_name but you get the idea

..:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com

 

 


-Original Message-
From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 25, 2006 10:10 PM
To: CF-Talk
Subject: RE: How would I code this line?






...:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com

 

 

-Original Message-
From: Rick Faircloth [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 25, 2006 3:43 PM
To: CF-Talk
Subject: How would I code this line?

My goal is to get rid of the comma after the Client_Last_Name, unless
there is a Client_Name_Suffix.



This is all one line with no spaces, but I separated the parts
to make it easier to read.what am I doing wrong?

Can I use the CFIF in the middle of the CFSET like that or should I do this:







Rick







~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251109
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: How would I code this line?

2006-08-25 Thread Bobby Hartsfield





..:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com

 

 

-Original Message-
From: Rick Faircloth [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 25, 2006 3:43 PM
To: CF-Talk
Subject: How would I code this line?

My goal is to get rid of the comma after the Client_Last_Name, unless
there is a Client_Name_Suffix.



This is all one line with no spaces, but I separated the parts
to make it easier to read.what am I doing wrong?

Can I use the CFIF in the middle of the CFSET like that or should I do this:







Rick





~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251106
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: How would I code this line?

2006-08-25 Thread Andy Matthews
You could use ListAppend with space as the delimiter.



-Original Message-
From: Rick Faircloth [mailto:[EMAIL PROTECTED]
Sent: Friday, August 25, 2006 2:43 PM
To: CF-Talk
Subject: How would I code this line?


My goal is to get rid of the comma after the Client_Last_Name, unless
there is a Client_Name_Suffix.



This is all one line with no spaces, but I separated the parts
to make it easier to read.what am I doing wrong?

Can I use the CFIF in the middle of the CFSET like that or should I do this:







Rick





~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251070
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: How would I code this line?

2006-08-25 Thread Charlie Griefer



 



On 8/25/06, Rick Faircloth <[EMAIL PROTECTED]> wrote:
> My goal is to get rid of the comma after the Client_Last_Name, unless
> there is a Client_Name_Suffix.
>
> 
> '#Get_New_Client.Client_First_Name# 
> #Get_New_Client.Client_Middle_Name# 
> #Get_New_Client.Client_Last_Name#
>
> 
>
> , #Get_New_Client.Client_Name_Suffix#
>
> 
>
> '>
>
> This is all one line with no spaces, but I separated the parts
> to make it easier to read.what am I doing wrong?
>
> Can I use the CFIF in the middle of the CFSET like that or should I do this:
>
> 
> '#Get_New_Client.Client_First_Name# 
> #Get_New_Client.Client_Middle_Name# 
> #Get_New_Client.Client_Last_Name#'
>
> 
>
> 
>
> 
>
> Rick
>
>
>
> 

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251069
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: How would I code this line?

2006-08-25 Thread Steve Bryant
Rick,

You can't use cfif within a cfset like that.

I think you cfsavecontent would be the best solution (best here being "most 
readable and maintainable).


#Get_New_Client.Client_First_Name#
#Get_New_Client.Client_Middle_Name# 
#Get_New_Client.Client_Last_Name#

,#Get_New_Client.Client_Name_Suffix#



>My goal is to get rid of the comma after the Client_Last_Name, unless
>there is a Client_Name_Suffix.
>
>
>'#Get_New_Client.Client_First_Name# 
>#Get_New_Client.Client_Middle_Name# 
>#Get_New_Client.Client_Last_Name#
>
>
>
>, #Get_New_Client.Client_Name_Suffix#
>
>
>
>'>
>
>This is all one line with no spaces, but I separated the parts
>to make it easier to read.what am I doing wrong?
>
>Can I use the CFIF in the middle of the CFSET like that or should I do this:
>
>
>'#Get_New_Client.Client_First_Name# 
>#Get_New_Client.Client_Middle_Name# 
>#Get_New_Client.Client_Last_Name#'
>
>
>
>
>
>
>
>Rick

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251068
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4