|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
|
|
#1
|
||||
|
||||
|
Cf 7 Warning!!!!!!
You may already know this but here it is just in case...
in coldfusion 6 u could write if blah blah variable = "" the "" would equal nothing or blank and your programming would work NOT SO WITH cf 7 in coldfusion 7 u have to write blah blah variable = " " the " " equals nothing or blank this seems stupid (and it is) but i just wasted 45 minutes on this crap thinking it was something else that was wrong. -Alas |
|
#2
|
|||
|
|||
|
Please don't post nonsense like this, because what you said is totally false. This code works perfectly under CFMX 7.0:
<cfoutput> <cfset blankVar = "" /> Length of the empty variable is: #len( blankVar )# (it will say 0)<br> </cfoutput>
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
|
#3
|
||||
|
||||
|
CORRECTION
1. What i said is TRUE! but only in Flash Forms srry for the mix up, i shouldve been more clear. 2. Kiteless you've stayed behind, CF 7 has changed some stuff...keep up -Alas |
|
#4
|
|||
|
|||
|
Dude I know you think you're being cute or something, but you are just digging yourself deeper into a hole. I'm not sure where you are pulling this junk out of, but you're just plain wrong! This code runs correctly.
<cfset blankVar = "" /> <cfform name="form1" format="flash" width="500" height="400"> <cfformgroup type="HBox"> <cfformgroup type="VBox"> <cfinput type="text" name="testBlank" value=""> <cfinput type="text" name="testBlankVar" value="#blankVar#"> <cfinput type="text" name="testBlankVarLen" value="#len( blankVar )#"> <cfinput type="submit" name="submitBtn" value="Save Data"> </cfformgroup> </cfformgroup> </cfform> A note to everyone, when you think you've found a bug in ColdFusion, the odds are actually about 99.9% that you've made a mistake. |
|
#5
|
||||
|
||||
|
Your script has nothing to do with what im talking about check this out
If this is the form: (NOTICE that the option value of Choose one is set to "" and not to " ") Code:
<cfform action="results.cfm" target="_top" format="flash" skin="haloblue" width="180"> <cfformgroup type="panel" label="Search"> <cfformgroup type="horizontal"> <cfformitem type="text" style="text-align:left">Gender:</cfformitem> </cfformgroup> <cfselect width="112" name="Gender" style="text-align:left"> <option value="">-Choose one-</option> <option value="1">Male</option> <option value="2">Female</option> </cfselect> <cfformgroup type="horizontal" style="text-align:center"> <cfinput type="submit" name="submit" value="Submit"> </cfformgroup> </cfformgroup> </cfform> Now write the results page: Code:
<CFIF IsDefined("FORM.Gender")>
<CFSET SESSION.bt.Gender = FORM.Gender>
</CFIF>
<CFQUERY NAME="Profilesearch" DATASOURCE="#Datasource#">
SELECT * FROM Client
WHERE 0=0
<CFIF SESSION.bt.Gender IS NOT "">
AND Gender = '#SESSION.bt.Gender#'
</CFIF>
ORDER BY ClientID
</CFQUERY>
Write a CFLOOP HERE
And guess what it doesn't work, but if u replace "" with " " in the flash form it works. So um *cough* looks like this was the 0.01% percent chance of finding an error in CF u were talking about...getting a bit Rusty with old age Kiteless? ![]() PS. i think its about time this noob be getting that yellow belt ![]() Last edited by Alas : March 14th, 2005 at 10:33 AM. |
|
#6
|
||||
|
||||
|
Quote:
Quote:
BUT, in this case you did indeed find a bug. I checked and it is a known bug that only affects a blank option value inside a cfselect. So pat yourself on the back, but not too hard because you're descriptive ability needs a lot of improvement. You started off with no code and a sweeping statement that you can't set a variable to a blank value in CFMX 7. The actual bug is that you can't have a blank value for an option tag inside a Flash cfselect form. Not only does that not have anything to do with using <cfset> or setting a variable, but it is an extremely specific situation. In the future save us both a bunch of trouble and post actual code so that I don't have to guess what you're talking about! |
|
#7
|
||||
|
||||
|
Yeah yeah, so where's my yellow belt?
lol |
|
#8
|
|||
|
|||
|
You don't get it until 250 posts I think. But because you did find a bug I'll give you a reputation point.
![]() |
|
#9
|
|||
|
|||
|
Quote:
You're joking right? Both the language and the server have a good few, some well known, some not, and many more serious than this - broken jdbc drivers that leak memory spring to mind. At my workplace we have 4 developers dedicated to keeping the thing running and we've got better things to do. mm owes me money and time ![]() |
|
#10
|
|||
|
|||
|
Certainly not joking. And a bug in a JDBC driver is not a CFMX bug, it is a JDBC driver bug. Macromedia doesn't write the JDBC drivers.
The point is that people love to seem to jump to the conclusion that any time something is wrong and they've spent some time trying to solve it and can't, that it must be a bug. The reality is that there are only a relative few genuine bugs and most of them are very esoteric. We have several giant CF apps running and we certainly do not have a team of 4 full time people who spend all their time keeping things running. I hate to have to break this to you, but if your servers and applications require 4 full time people just to keep things running, you're doing something wrong. |
|
#11
|
|||
|
|||
|
well, I take your point about looking for a solution first and I admit my little rant is more about cfmx server than the language so a bit OT. But I do think cfmx server is a leaky, unpredictable product & if I had a choice I'd drop it like a hot brick. We are running high profile transactional sites, we get it in the neck when they're down and currently jrun is running up to 100% cpu about once a day. Yes, I've read everything there is to read on this @ mm, we have service calls open with them etc etc (altho if you have any suggestions, pipe up!) and have 10 or so years experience with cf between us at a guess. I also use Tomcat/struts and have had no problems...
|
|
#12
|
|||
|
|||
|
What does Macromedia support say? My guess would be that if you have things set up and tuned correctly, and have the latest CFMX and JRun patches installed, that if you are still having problems it is somewhere in the code (or the SQL).
|
|
#13
|
|||
|
|||
|
Quote:
yes, you're probably right - macromedia are currently out of suggestions apart from a site visit |
|
#14
|
|||
|
|||
|
You might try load testing the app using something like the Microsoft Web Application Stress Testing Kit. It's free and it works very well. By blasting the server you may be able to track down the problem.
Depending on the version you could also run into serious trouble with unlocked reads or especially writes to the session, application or server scopes. And then there are thread safety issues with CFC's, especially if you aren't var scoping any method-local variables. If things are really bad you might try having a third party do a code review (something like http://www.productivityenhancement....ePeerReview.cfm ) |
|
#15
|
|
|