RE: cfswitch

2008-08-04 Thread Dave Watts
> Can someone confirm that we cann't actually use > variables in cfswitch case values ??? I feel it is > ridiculous.. What is the reasoning behind this if it > si true? This is how switch/case works in most compiled languages I've seen. The compiler needs to know all

Re: cfswitch

2008-08-04 Thread Claude Schneegans
>>switch () in java allows constants to be used in case. I wish cf did too. CF does allow constants in case. Do you actually mean "java allows VARIABLES in case"? If yes, then no, like CF, Java allows only constantExpressions in case. -- ___ REUSE CODE! Use

Re: cfswitch

2008-08-04 Thread Claude Schneegans
>>I feel it is ridiculous.. What is the reasoning behind this if it si true? The reasoning is that is allows for a more efficient alternative to the general case if(expression1 == value1 ) ... elseif(expression2 == value2) ... elseif(expression3 == value3) ...construct, in the particular case

Re: cfswitch

2008-08-04 Thread Larry Lyons
> >Can someone confirm that we cann't actually use variables in cfswitch > case values ??? > >I feel it is ridiculous.. What is the reasoning behind this if it si > true? > > > >I tried.. > > > >... > >... > > > >etc, where

Re: cfswitch

2008-08-04 Thread morgan l
> > "The value or values must be simple constants or constant expressions, > not variables." The root of the problem then is: CF doesn't allow declaration of "constants", only variables. ~| Adobe® ColdFusion® 8 software 8 is th

Re: cfswitch

2008-08-04 Thread Brian Dumbledore
>Can someone confirm that we cann't actually use variables in cfswitch case >values ??? >I feel it is ridiculous.. What is the reasoning behind this if it si true? > >I tried.. > >... >... > >etc, where CONST1 and CONST2 are cfset in the application.cf

Re: cfswitch

2008-08-04 Thread James Holmes
t actually use variables in cfswitch case > values ??? -- mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to d

RE: cfswitch

2008-08-04 Thread Dave Phillips
Brian, Yes, I believe that is true and this is the circumstance where you must use CFIF/CFELSE/CFELSEIF. There's an article on this topic (cfswitch/cfif) at: http://blog.dasignz.com/blog/post/2008/07/CFSWITCH-Vs-CFIF.aspx (sadly posted on a .NET site though) Sincerely, Dave Phi

cfswitch

2008-08-04 Thread Brian Dumbledore
Can someone confirm that we cann't actually use variables in cfswitch case values ??? I feel it is ridiculous.. What is the reasoning behind this if it si true? I tried.. ... ... etc, where CONST1 and CONST2 are cfset in the application.cfm and it comp

Re: How is cfswitch better that cfif?

2008-05-30 Thread s. isaac dealey
> Yeh, great explanation from barney. > > I'd just like to add that, knowing this, the choice between if and > switch in CF is then down to readability / logic / personal > preference. If there is a conditional that has a single simple > expression with several 'options', switch reads far better t

Re: How is cfswitch better that cfif?

2008-05-30 Thread Barney Boisvert
You can do whatever you want, of course. I was just prioritizing by ROI. God knows there are enough decisions made directly in the fact of maximizing ROI. cheers, barneyb On Fri, May 30, 2008 at 12:32 PM, Gerald Guido <[EMAIL PROTECTED]> wrote: > On Fri, May 30, 2008 at 1:36 PM, Barney Boisvert

Re: How is cfswitch better that cfif?

2008-05-30 Thread Gerald Guido
On Fri, May 30, 2008 at 1:36 PM, Barney Boisvert <[EMAIL PROTECTED]> wrote: > optimize your DB, add caching, check for any "silly" > algorithms (query w/in a loop where a JOIN would work, etc.). Then > tune your JVM. Then buy more hardware. Then switch from CF to a > lower-level language.

RE: How is cfswitch better that cfif?

2008-05-30 Thread Mike Francisco
Awesome info/links Charlie and Barney! To quote the Adobe CF8 livedocs reference: "The cfswitch tag provides better performance than a series of cfif/cfelseif tags, and the code is easier to read." I guess the moral to this is, 'don't treat everything you find on the off

Re: How is cfswitch better that cfif?

2008-05-30 Thread Dominic Watson
Yeh, great explanation from barney. I'd just like to add that, knowing this, the choice between if and switch in CF is then down to readability / logic / personal preference. If there is a conditional that has a single simple expression with several 'options', switch reads far better to me. Otherw

RE: How is cfswitch better that cfif?

2008-05-30 Thread Mike Francisco
about the better performance of cfswitch; however, without further technical explanation. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192

Re: How is cfswitch better that cfif?

2008-05-30 Thread Charlie Griefer
PROTECTED]> wrote: >> That was a rumor a few years ago, because switch frequently performs >> better in lower-level languages because of reduced expression >> evaluation. I did some testing and found that the opposite is true in >> CF: CFIF performs better than CFSWITCH. N

Re: How is cfswitch better that cfif?

2008-05-30 Thread Barney Boisvert
few years ago, because switch frequently performs > better in lower-level languages because of reduced expression > evaluation. I did some testing and found that the opposite is true in > CF: CFIF performs better than CFSWITCH. Not all conditionals can use > CFSWITCH, of course, but

Re: How is cfswitch better that cfif?

2008-05-30 Thread Barney Boisvert
That was a rumor a few years ago, because switch frequently performs better in lower-level languages because of reduced expression evaluation. I did some testing and found that the opposite is true in CF: CFIF performs better than CFSWITCH. Not all conditionals can use CFSWITCH, of course, but

RE: How is cfswitch better that cfif?

2008-05-30 Thread Andy Matthews
riday, May 30, 2008 12:24 PM To: CF-Talk Subject: How is cfswitch better that cfif? Alot docs I've read says that cfswitch performs better than cfif. Does anyone know in what way? How would it be better if both tags are processed by the CF server engine anyway. I wanted to justify if it is

How is cfswitch better that cfif?

2008-05-30 Thread Mike Francisco
Alot docs I've read says that cfswitch performs better than cfif. Does anyone know in what way? How would it be better if both tags are processed by the CF server engine anyway. I wanted to justify if it is worth the effort of rewriting some of my code to improve the performance of my app

RE: cfswitch in cf8

2007-11-26 Thread Brad Wood
2:01 PM To: CF-Talk Subject: RE: cfswitch in cf8 A bit off of this particular topic but this got me working with JavaCast( ) trying to influence the way CF handles the comparison operater. I wrote a blog post about it. http://www.coldfusionmuse.com/index.cfm/2007/11/26/javacast.iterations The

RE: cfswitch in cf8

2007-11-26 Thread Mark A Kruger
comparisons doesn't offer much hope for appreciable gains. -Mark -Original Message- From: Brad Wood [mailto:[EMAIL PROTECTED] Sent: Monday, November 26, 2007 10:14 AM To: CF-Talk Subject: RE: cfswitch in cf8 > In any case, I don't really care about the "orig

RE: cfswitch in cf8

2007-11-26 Thread Dave Watts
> If it helps, I did run the test originally for 10,000 > iterations which, given my application, is a very realistic > number to consider. While the comparison is less dramatic > the cfswitch is still a full second slower which is > significant enough to me not to use it i

Re: cfswitch in cf8

2007-11-26 Thread Brian Kotek
On Nov 26, 2007 11:14 AM, Brad Wood <[EMAIL PROTECTED]> wrote: > > If it helps, I did run the test originally for 10,000 iterations which, > given my application, is a very realistic number to consider. While the > comparison is less dramatic the cfswitch is still a full second

RE: cfswitch in cf8

2007-11-26 Thread Brad Wood
he test originally for 10,000 iterations which, given my application, is a very realistic number to consider. While the comparison is less dramatic the cfswitch is still a full second slower which is significant enough to me not to use it in this specific situation. (47 ms / 1141 ms) My CIO has re

RE: cfswitch in cf8

2007-11-21 Thread Dave Watts
sides my iterative test, you keep ignoring the reports of > real live applications who suffered from the performance of > cfswitch tags and strings. If you have a real live application which suffers from some specific performance problem, you should address that performance problem. My

RE: cfswitch in cf8

2007-11-21 Thread Brad Wood
wed for performance degradations which were larger than mere milliseconds. Besides my iterative test, you keep ignoring the reports of real live applications who suffered from the performance of cfswitch tags and strings. > Yes, and the way to identify those problems is through load testin

RE: cfswitch in cf8

2007-11-21 Thread Dave Watts
useful about the language itself. If I told you I was writing an application in CFML using CFSWITCH with string constants, and didn't provide any further details, what would you advise me to do in this particular case? How about if I said I was using CF 7, but would soon upgrade to CF 8? Or

RE: cfswitch in cf8

2007-11-21 Thread Brad Wood
think you can dismiss the fact that users of CF7 whom rely on many cfswitch tags evaluating strings on a high trafficked will experience slower code than if they used a cfif construct. Of course, I wouldn't recommend re-writing any code unless you actually experience a problem; but my original

RE: cfswitch in cf8

2007-11-21 Thread Dave Watts
> Not so fast there cowboy. :) The 200 mili and 400 mili > numbers were 1 million loops of a 4-faceted cfif and cfswitch > structure respectively comparing string values on CF8. > > That same test on CF7.0.2 yields 1 second for the cfif and > 115 seconds (nearly two minu

RE: cfswitch in cf8

2007-11-21 Thread Brad Wood
> Which is why this sort of optimization concern is so pointless! :) Not so fast there cowboy. :) The 200 mili and 400 mili numbers were 1 million loops of a 4-faceted cfif and cfswitch structure respectively comparing string values on CF8. That same test on CF7.0.2 yields 1 second for

Re: cfswitch in cf8

2007-11-21 Thread Sean Corfield
On Nov 21, 2007 10:10 AM, Brad Wood <[EMAIL PROTECTED]> wrote: > A SeeFusion stack trace did indeed show constant attempts to convert the > strings to doubles, and then the resultant exceptions that were thrown > and caught internally. Note that if you run the CF8 debugger with break on exceptions

cfswitch in cf8

2007-11-21 Thread Brad Wood
I don't know if this has been thrown out there or not, so here it is. Some of you will remember a conversation that referred to this webapper blog (http://www.webapper.net/index.cfm?fuseaction=Fuseblog.ShowComments&Arti cleID=20060727042244) about cfswitch on string values being hor

RE: cfif vs cfswitch

2007-01-30 Thread Richard Kroll
> I agree with Jochem's suggestion of using cfswitch for numeric or perhaps > single character searches. The problem as noted in the link Jochem provided is that when using cfswitch, CF under the hood attempts a toDouble(), which if it is numeric hums happily along. If you pass in

Re: cfif vs cfswitch

2007-01-30 Thread Teddy Payne
I agree with Jochem's suggestion of using cfswitch for numeric or perhaps single character searches. CF offers short circuit evaluation that increases the speed of boolean decisions. Whenever you need more than one cfif or cfelseif, you need to really evaluate which condition is the most l

Re: cfif vs cfswitch

2007-01-30 Thread Matt Robertson
On 1/30/07, Richard Kroll <[EMAIL PROTECTED]> wrote: > We noticed that when the cfswitch was > outside of a loop, the performance difference was virtually > undetectable. Good point. The performance difference on a single operation could well be acceptable, if s

Re: cfif vs cfswitch

2007-01-30 Thread Matt Robertson
On 1/30/07, Jochem van Dieten <[EMAIL PROTECTED]> wrote: > Matt Robertson wrote: > > Do you just take somebodies word for it or have you benchmarked it > yourself in your own environment? One thing I lack is testing platforms, so the answer is the former, with respect to the people saying it was f

Re: cfif vs cfswitch

2007-01-30 Thread Scott Weikert
Does this cfswitch vs cfif performance difference apply to similarly coded stuff within areas, considering the syntax is slightly different? I'm assuming the same issues apply, but figured it was worth asking. --

RE: cfif vs cfswitch

2007-01-30 Thread Richard Kroll
We had the same problem that Jochem's post related to. We changed all our cfswitch/cfcase statements that worked with strings inside loops to cfif/cfelseif statements and saw increased performance and stability. This was on a CF7 set of servers. We noticed that when the cfswitch was outside

Re: cfif vs cfswitch

2007-01-30 Thread Jochem van Dieten
Matt Robertson wrote: >> http://webapper.net/index.cfm?fuseaction=Fuseblog.ShowComments&ArticleID=20060727042244 > I am cringing at all of the code I have running under switches under > the supposition that its more efficient code. Hell... thats what a > case statement is supposed to be in the

RE: cfif vs cfswitch

2007-01-29 Thread Eric Roberts
I remember in a previous discussion about cfif vs cfswitch that it was determined that there really wasn't much of a difference, performance wise between the 2...it basically came down to a matter of choice. I personally prefer cfif's...but that is a personal preference... Eric ---

Re: cfif vs cfswitch

2007-01-29 Thread Will Tomlinson
Ok, now I'd like to know how your boss knew this, and most of us didn't on the list! lol! Will ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs http:http://ad.doublec

Re: cfif vs cfswitch

2007-01-29 Thread Doug Brown
Still waiting to hear if this was involved with CFMX7. I would really hate this sense all my apps use cfswitch for template switching. :-( Doug B. - Original Message - From: "Josh Nathanson" <[EMAIL PROTECTED]> To: "CF-Talk" Sent: Monday, January 29, 2007

Re: cfif vs cfswitch

2007-01-29 Thread Matt Robertson
On 1/29/07, Josh Nathanson <[EMAIL PROTECTED]> wrote: > As usual Jochem is the final word...very good to know that! Holy cow. Indeed. Thanks Jochem. I am cringing at all of the code I have running under switches under the supposition that its more efficient code. Hell... thats what a case stat

Re: cfif vs cfswitch

2007-01-29 Thread Josh Nathanson
As usual Jochem is the final word...very good to know that! Hopefully this will be addressed in CF8. - Original Message - From: "Josh Nathanson" <[EMAIL PROTECTED]> To: "CF-Talk" Sent: Monday, January 29, 2007 2:05 PM Subject: Re: cfif vs cfswitch > Wh

Re: cfif vs cfswitch

2007-01-29 Thread Matt Robertson
just say yes to switch / case. I'm not aware of any issues but I'd be happy to learn something new today. -- [EMAIL PROTECTED] Janitor, The Robertson Team mysecretbase.com ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 &

Re: cfif vs cfswitch

2007-01-29 Thread Josh Nathanson
What issues could there be? It either works or it doesn't. It's not like CFDocument or something where there are a whole bunch of moving parts involved. He could be questioning the speed, but if anything I would imagine a cfswitch would be quicker than a bunch of cfif/cfelse

Re: cfif vs cfswitch

2007-01-29 Thread Jochem van Dieten
Cutter (CFRelated) wrote: > Recently I rewrote one of the templates within our massive system. The > template had two large cfif/cfelseif blocks that appeared better suited > for switch/case statements, which I implemented in cfscript. When my > boss saw this he said that there were issues with

Re: cfif vs cfswitch

2007-01-29 Thread Jerry Johnson
New to me, too. On 1/29/07, Cutter (CFRelated) <[EMAIL PROTECTED]> wrote: > > Recently I rewrote one of the templates within our massive system. The > template had two large cfif/cfelseif blocks that appeared better suited > for switch/case statements, which I implemented in cfscript. When my > bo

Re: cfif vs cfswitch

2007-01-29 Thread RobG
ho thought he was a whole lot better than he was, insisted that cfif's were faster than cfswitch/case and insisted I do it his way. Fortunately I don't work for this guy anymore. :) Rob ~| Upgrade to Adobe ColdFusion MX

Re: cfif vs cfswitch

2007-01-29 Thread Charlie Griefer
On 1/29/07, Cutter (CFRelated) <[EMAIL PROTECTED]> wrote: > Recently I rewrote one of the templates within our massive system. The > template had two large cfif/cfelseif blocks that appeared better suited > for switch/case statements, which I implemented in cfscript. When my > boss saw this he said

cfif vs cfswitch

2007-01-29 Thread Cutter (CFRelated)
Recently I rewrote one of the templates within our massive system. The template had two large cfif/cfelseif blocks that appeared better suited for switch/case statements, which I implemented in cfscript. When my boss saw this he said that there were issues with switch/case in CF, and I have com

Re: CFSWITCH and ROLLUP

2007-01-26 Thread Teddy Payne
The columns that go into the group by must be the original name of the column and not the aliases. Cheers, Teddy On 1/26/07, Michele Michele <[EMAIL PROTECTED]> wrote: > > >Sorry, that was a typo..I was copying and pasting the columns into the > group > >by rollup. > > > >Cheers, > >Teddy > > >

Re: CFSWITCH and ROLLUP

2007-01-26 Thread Michele Michele
>Sorry, that was a typo..I was copying and pasting the columns into the group >by rollup. > >Cheers, >Teddy > Hi Teddy- Unfortunately, there were many more cartoon characters there, the rollup balked. I took that switch in the select out, and I am wondering if I can give those three columns an

Re: CFSWITCH and ROLLUP

2007-01-26 Thread Teddy Payne
County > > > value="CTV_County">CTV_County > >, > > > is the cfswitch even necessary, can you just use #sort# instead? > > ~~

Re: CFSWITCH and ROLLUP

2007-01-26 Thread Paul Hastings
Teddy Payne wrote: > SELECT >State >County > value="CTV_County">CTV_County > , is the cfswitch even necessary, can

Re: CFSWITCH and ROLLUP

2007-01-26 Thread Teddy Payne
Michele, I love the funny names of the columns, but the funny names would also need to be in your group by: SELECT State County CTV_County , e.NUM_HOURS, e.NUM_SO

CFSWITCH and ROLLUP

2007-01-26 Thread Michele Michele
Hi- I am trying to incorporate a switch statement in my rollup, however I get the ORA-00979: not a GROUP BY expression error. Now, I know you have to include all column names in your rollup, but I know I have seen what I am trying to do done before. Here is my code, I had to change some of the

RE: Who fixed it so ya can't set a var inside cfswitch?

2006-12-21 Thread Bobby Hartsfield
Now THAT is cool. :-) ahh the good old days of chat bot programming -Original Message- From: Kris Jones [mailto:[EMAIL PROTECTED] Sent: Thursday, December 21, 2006 9:41 AM To: CF-Talk Subject: Re: Who fixed it so ya can't set a var inside cfswitch? There's also Ben Forta&#x

Re: Who fixed it so ya can't set a var inside cfswitch?

2006-12-21 Thread Will Tomlinson
> There's always the cfquickdocs search tool for firefox. That way you > don't have to think like Dave Watts... Oh sweeet! Thanks dude! Will ~| Create robust enterprise, web RIAs. Upgrade & integrate Adobe Coldfusion MX7 wi

Re: Who fixed it so ya can't set a var inside cfswitch?

2006-12-21 Thread Kris Jones
There's also Ben Forta's IM for the livedocs? Try this: AIM: cflivedocs Cheers, Kris > >The CFGoogleBot is great as well, just type in the tag you want and it will > >google talk you back with the syntax and the link to LiveDocs. ~~

Re: Who fixed it so ya can't set a var inside cfswitch?

2006-12-21 Thread Larry Lyons
>The CFGoogleBot is great as well, just type in the tag you want and it will >google talk you back with the syntax and the link to LiveDocs. > > > Link please? thx, larry ~| Create robust enterprise, web RIAs. Upgrade & integrat

Re: Who fixed it so ya can't set a var inside cfswitch?

2006-12-21 Thread Robertson-Ravo, Neil (RX)
ot; Visit our website at http://www.reedexpo.com -Original Message- From: Bobby Hartsfield To: CF-Talk Sent: Thu Dec 21 03:14:35 2006 Subject: RE: Who fixed it so ya can't set a var inside cfswitch? That's a new one to me. Thanks. -Original Message- From: Larry

Re: Who fixed it so ya can't set a var inside cfswitch?

2006-12-20 Thread Claude Schneegans
>>"You can't use any tags other than cfcase and cfdefaultcase inside a cfswitch." What is meant here really is "right after the http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address:

RE: Who fixed it so ya can't set a var inside cfswitch?

2006-12-20 Thread Bobby Hartsfield
That’s a new one to me. Thanks. -Original Message- From: Larry Lyons [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 20, 2006 8:04 PM To: CF-Talk Subject: Re: Who fixed it so ya can't set a var inside cfswitch? > Dude, if everyone had the CF reference memorized, there'd

Re: Who fixed it so ya can't set a var inside cfswitch?

2006-12-20 Thread Larry Lyons
> Dude, if everyone had the CF reference memorized, there'd be no cftalk. > And their name would be Dave Watts. :) > Will, There's always the cfquickdocs search tool for firefox. That way you don't have to think like Dave Watts... You can get the toolbar plugin here: http://www.coldfusionuse

Re: Who fixed it so ya can't set a var inside cfswitch?

2006-12-20 Thread Will Tomlinson
>For anyone who doesn't have it memorized, there's this nifty trick called >"READING". At least as far back as CF3.1 Hey, this would be a good post for every thread here. I'm gonna start using it for replies myself. "READ!" "READ!" "READ!" :) ~~~

RE: Who fixed it so ya can't set a var inside cfswitch?

2006-12-20 Thread Bobby Hartsfield
Hey, don’t make subtle sarcastic jokes at Will's expense... that's MY job. ;-) -Original Message- From: Dave Francis [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 20, 2006 12:38 PM To: CF-Talk Subject: RE: Who fixed it so ya can't set a var inside cfswitch? For any

RE: Who fixed it so ya can't set a var inside cfswitch?

2006-12-20 Thread Dave Francis
o ya can't set a var inside cfswitch? Dude, if everyone had the CF reference memorized, there'd be no cftalk. And their name would be Dave Watts. :) Will ~| Create robust enterprise, web RIAs. Upgrade & integrate Ado

Re: Who fixed it so ya can't set a var inside cfswitch?

2006-12-20 Thread Robertson-Ravo, Neil (RX)
Wed Dec 20 13:03:55 2006 Subject: Re: Who fixed it so ya can't set a var inside cfswitch? Dude, if everyone had the CF reference memorized, there'd be no cftalk. And their name would be Dave Watts. :) Will ~| Crea

RE: Who fixed it so ya can't set a var inside cfswitch?

2006-12-20 Thread Andy Matthews
You can't use any other tag directly inside a cfswitch tag. But you can use a cfset inside a cfcase or cfdefaultcase tag. -Original Message- From: Will Tomlinson [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 19, 2006 6:15 PM To: CF-Talk Subject: Who fixed it so ya can't

Re: Who fixed it so ya can't set a var inside cfswitch?

2006-12-20 Thread Will Tomlinson
Dude, if everyone had the CF reference memorized, there'd be no cftalk. And their name would be Dave Watts. :) Will ~| Create robust enterprise, web RIAs. Upgrade & integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doublecli

Re: Who fixed it so ya can't set a var inside cfswitch?

2006-12-20 Thread Robertson-Ravo, Neil (RX)
cfswitch can only contain cfcase blocks, it wouldn't make any sense any other way. If you want conditionals then they have to be in a case, but by that very process it already has met some condition. Have you missed something?.. How about the CFML reference :-) "This e-ma

Re: Who fixed it so ya can't set a var inside cfswitch?

2006-12-19 Thread Charlie Griefer
why wouldn't you set your variable inside a ? if the variable setting isn't dependent on one of the values...why are you trying to set it inside of the anyway? :) On 12/19/06, Will Tomlinson <[EMAIL PROTECTED]> wrote: > I just tried looping inside a cfswitch and setting som

RE: Who fixed it so ya can't set a var inside cfswitch?

2006-12-19 Thread Coldfusion
Hmm really? I could have sworn I have done this many times. Paste some code -Original Message- From: Will Tomlinson [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 19, 2006 7:15 PM To: CF-Talk Subject: Who fixed it so ya can't set a var inside cfswitch? I just tried looping ins

Re: Who fixed it so ya can't set a var inside cfswitch?

2006-12-19 Thread Barney Boisvert
> Amd I missin somethin? Yeah, the 'n' in 'and', and the fact that you put your CFSET in the wrong place. You can put your CFSET outside the CFSWITCH (but still inside the loop), or inside a CFCASE/CFDEFAULTCASE inside the CFSWITCH, but not directly inside the CFSWITCH.

Who fixed it so ya can't set a var inside cfswitch?

2006-12-19 Thread Will Tomlinson
I just tried looping inside a cfswitch and setting some dynamic variables, and I got this stupid lookin typo'd error that read somethin like, "You can't use any tags other than cfcase and cfdefaultcase inside a cfswitch." So I hafta resort to cfif's for this? Amd

Re: cfbreak in cfswitch in CFMX 7?

2005-07-11 Thread Barney Boisvert
make code far less maintainable and harder to read with a buttload of nested conditionals that solving the problem can require. cheers, barneyb On 7/11/05, Sean Corfield <[EMAIL PROTECTED]> wrote: > On 7/11/05, Johnny Le <[EMAIL PROTECTED]> wrote: > > CFbreak doesn't

Re: cfbreak in cfswitch in CFMX 7?

2005-07-11 Thread Sean Corfield
On 7/11/05, Johnny Le <[EMAIL PROTECTED]> wrote: > CFbreak doesn't seem to work in cfswitch in CF 7 any more. Correct. Allowing it was a bug in CFMX 6.x. If you tried it in CF5, it was illegal. > What tag do you use to break out of cfswitch now? You don't need a tag.

Re: cfbreak in cfswitch in CFMX 7?

2005-07-11 Thread Barney Boisvert
rs, barneyb On 7/11/05, Matthew Walker <[EMAIL PROTECTED]> wrote: > Do you mean to stop each successive cfcase from executing? You don't need to > do that in cfswitch, only in the cfscript switch(). > > > -Original Message- > From: Johnny Le [mailto:[EMAIL

RE: cfbreak in cfswitch in CFMX 7?

2005-07-11 Thread Matthew Walker
Do you mean to stop each successive cfcase from executing? You don't need to do that in cfswitch, only in the cfscript switch(). -Original Message- From: Johnny Le [mailto:[EMAIL PROTECTED] Sent: Tuesday, 12 July 2005 2:12 p.m. To: CF-Talk Subject: cfbreak in cfswitch in CFMX 7

cfbreak in cfswitch in CFMX 7?

2005-07-11 Thread Johnny Le
Hi, CFbreak doesn't seem to work in cfswitch in CF 7 any more. What tag do you use to break out of cfswitch now? Johnny ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tra

Re: cfswitch, case, cfinclude and the path problem

2004-07-22 Thread md insua
Greg, Thanks. I'm still a tad green at this and the _javascript_ ref is a touch over my abilities for now. Apologies as I did not indicate the fact that I'm including the newPage.cfm into my existing page for continuity of information delivery without having to reproduce the same static shell ove

RE: cfswitch, case, cfinclude and the path problem

2004-07-22 Thread Ken Ferguson
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, July 22, 2004 3:00 PM To: CF-Talk Subject: RE: cfswitch, case, cfinclude and the path problem template="/mytestarea/cfi/newPage.cfm?variableName2=variable2& variableName3=variable3?> you'll have to use or js loca

RE: cfswitch, case, cfinclude and the path problem

2004-07-22 Thread Ken Ferguson
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, July 22, 2004 3:00 PM To: CF-Talk Subject: RE: cfswitch, case, cfinclude and the path problem template="/mytestarea/cfi/newPage.cfm?variableName2=variable2& variableName3=variable3?> you'll have to use or js loca

RE: cfswitch, case, cfinclude and the path problem

2004-07-22 Thread Ken Ferguson
om: md insua [mailto:[EMAIL PROTECTED] Sent: Thursday, July 22, 2004 2:52 PM To: CF-Talk Subject: cfswitch, case, cfinclude and the path problem I have run into a bit of a path error in trying to use the cfswitch / cfcase tags in place of the cfif, cfelseif and cfelse with a cfinclude. Here?s an exa

RE: cfswitch, case, cfinclude and the path problem

2004-07-22 Thread Greg.Morphis
for the path using the ColdFusion Administrator. Using relative paths (e.g. TEMPLATE="index.cfm" or TEMPLATE="../index.cfm") does not require the creation of any special mappings. It is therefore recommended that you use relative paths with CFINCLUDE whenever possible. The error occurred

cfswitch, case, cfinclude and the path problem

2004-07-22 Thread md insua
I have run into a bit of a path error in trying to use the cfswitch / cfcase tags in place of the cfif, cfelseif and cfelse with a cfinclude. Here?s an example of where I?m at: for the path using the ColdFusion Administrator. Using relative paths (e.g. TEMPLATE="inde

RE: BIG Forms: CFSWITCH or CFIF?

2003-12-17 Thread Matt Robertson
Thanks to Isaac, Matt and Barney for giving me stuff to think about. I'd clean forgot about qforms and terraforms, and using a custom tag never occurred to me.   Since I have to do this now and my 6.1 upgrade won't happen for at least a month I can't use udf's on this project, unfortunately.  Whil

RE: BIG Forms: CFSWITCH or CFIF?

2003-12-16 Thread S . Isaac Dealey
> bad and I wouldn't want to be maintaining that code. > -Original Message- > From: S. Isaac Dealey [mailto:[EMAIL PROTECTED] > Sent: Wednesday, 17 December 2003 3:21 p.m. > To: CF-Talk > Subject: Re: BIG Forms: CFSWITCH or CFIF? > Personally I'd recommend n

RE: BIG Forms: CFSWITCH or CFIF?

2003-12-16 Thread Matthew Walker
miniscule. To me both those code examples look bad and I wouldn't want to be maintaining that code. -Original Message- From: S. Isaac Dealey [mailto:[EMAIL PROTECTED] Sent: Wednesday, 17 December 2003 3:21 p.m. To: CF-Talk Subject: Re: BIG Forms: CFSWITCH or CFIF? Personally I

Re: BIG Forms: CFSWITCH or CFIF?

2003-12-16 Thread S . Isaac Dealey
Personally I'd recommend neither ... I doubt the cfswitch will save you any processing speed in this particular case. However, I'd go for a function or custom tag to handle your form elements and pass a structure to them to populate the individual fields. Inside the tag, check the str

RE: BIG Forms: CFSWITCH or CFIF?

2003-12-16 Thread Matt Robertson
Barney Boisvert wrote: >Method 2 for sure.  At the Java level, both the CFIF and the CFSWITCH >are both if statements Very Interesting.  I'm still running on CF 4.5 but I'll be upgrading to 6.1 shoertly. >IMHO, 99.9% of the time, readable, easily maintainable code is way

RE: BIG Forms: CFSWITCH or CFIF?

2003-12-16 Thread Barney Boisvert
Method 2 for sure.  At the Java level, both the CFIF and the CFSWITCH are both if statements, because the Java switch statement only works on numeric types (byte, short, int, long and char).  Then, factor in the extra assignment overhead on method 1, count the number of extra lines in method 1

BIG Forms: CFSWITCH or CFIF?

2003-12-16 Thread Matt Robertson
de, I thought I'd ask which y'all think is the better approach for a big form. Method 1 is verbose, but its use of cfswitch might be faster? Method 2 is easier to code, but uses slower cfifs.  Lots of them on longer forms. So on a form with a couple of dozen fields like this, which do you th

RE: Cfswitch question

2003-06-30 Thread Candace Cottrell
Gotcha... Thx Candace K. Cottrell, Web Developer The Children's Medical Center One Children's Plaza Dayton, OH 45404 937-641-4293 http://www.childrensdayton.org [EMAIL PROTECTED] >>> [EMAIL PROTECTED] 6/30/2003 11:17:48 AM >>> Well you could use the pre

RE: Cfswitch question

2003-06-30 Thread Jim Davis
> -Original Message- > From: Candace Cottrell [mailto:[EMAIL PROTECTED] > Sent: Monday, June 30, 2003 11:07 AM > To: CF-Talk > Subject: RE: Cfswitch question > > Thanks Jim... > > Sooo, I guess I have to do this by going through each of my roles and > do

RE: Cfswitch question

2003-06-30 Thread Ian Skinner
Well you could use the pre-cfswitch option... No mathing roles found. Not quite as clean as a cfswitch...but some of the benifits and should be a bit faster then a bunch of complete blocks. This code block will stop testing conditions once a match is found. To optimize it, put your

RE: Cfswitch question

2003-06-30 Thread Candace Cottrell
tribute looks at the RETURN of "expression" - it doesn't act as input to it.) Jim Davis > -Original Message- > From: Candace Cottrell [mailto:[EMAIL PROTECTED] > Sent: Monday, June 30, 2003 10:55 AM > To: CF-Talk > Subject: Cfs

RE: Cfswitch question

2003-06-30 Thread Jim Davis
s > -Original Message- > From: Candace Cottrell [mailto:[EMAIL PROTECTED] > Sent: Monday, June 30, 2003 10:55 AM > To: CF-Talk > Subject: Cfswitch question > > Is this illegal? > > > > Administrator Functions: > >

  1   2   >