Mar 22 2006

Stupid ColdFusion Mistake...

Posted by Joe Rinehart at 2:12 PM
8 comments
- Categories: ColdFusion MX

I've been puzzled for a few minutes over why both things are happening in the following conditional (inside of a ). I thought I'd share, it's really kind of cute.

<cfif foo>
<cfset someComponent.doSomething() />
<else>
<cfset someComponent.doSomethingElse() />
</cfif>

Do ya see it?

Comments

RconR

RconR wrote on 03/22/06 2:22 PM

Yes you are using &lt;else&gt; instead of &lt;cfelse&gt;.
Is that what you mean?
It happens a lot when you are use to programming in other languages. I do it all the time.
Steve Rittler

Steve Rittler wrote on 03/22/06 3:23 PM

Happens to me when i'm transitioning between cfscript and tag-based coding...just about every time!
Scott Stroz

Scott Stroz wrote on 03/22/06 3:48 PM

'cute' code, gotta love it.
J-Fleaux

J-Fleaux wrote on 03/22/06 5:11 PM

Hey Joe, not sure if this is the proper place for this comment but oh well...from what I recall you swear by CFEclipse. I know they used to have an FTP plugin for eclipse but I can't find one now. You don't by any chance know where I can find one do you?
J-Fleaux

J-Fleaux wrote on 03/22/06 10:34 PM

Scratch that...it's not on their main download page anymore, you gotta use the update manager hee hee
Mark Drew

Mark Drew wrote on 03/23/06 11:26 AM

The FTP part for cfeclipse is in the File Explorer view. there is a little arrow at the top of that view that allows you to define FTP servers just like momma used to bake in HomeSite.

Hope that helps!

Mark Drew
kelly

kelly wrote on 04/09/06 2:10 AM

i tend to do that slightly differnly...
&lt;cfif&gt; blah
&lt;cfelseif&gt;
blah
&lt;/cfif&gt;

cfelseIF what? lol anyway that's my common ifflub.
Sandy Clark

Sandy Clark wrote on 04/13/07 8:29 PM

Just a little birthday vandalism!

Happy Birthday Joe!

Write your comment



(it will not be displayed)