Mike,

On a side note to this, if you use the line debugger built into CF. The one
thing that becomes obvious straight away is that the line break would show a
can't reach or something, this is a huge indication to the weary that CF has
a cached version if you tried to line break that line.

Just another way to know if CF has it cached or not... Which can save so
many heartaches at times.

Like I said it is a side note, but one that could have helped.

Regards,
Andrew Scott


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf
Of Mike Kear
Sent: Monday, 1 June 2009 4:48 PM
To: [email protected]
Subject: [cfaussie] Re: String concatenation - what's happening here?


I said at the outset that this problem was going to turn out to be one
of those 'slap the forehead' moments.   And so it's turned out.

I'm using ColdSpring to instantiate the CFC in question.   I forgot to
reset the application to force a load of a new copy of the CFC into
RAM.  So I'm making changes to the code,  but they're not actually
finding their way into the compiled code that CF is running.   All i'm
doing is running the same code over and over.

What hid that stupidity from me, is the error messages would show the
error in the NEW line of code,  even though it was the OLD line that
was executed.

SO ... lesson [A]  to learn:  after EVERY change in a CFC,  if you're
running ColdSpring  call the new file with ?reset=yes   in the URL to
force the onApplicationStart() method and OnSessionStart() method to
run.   (assuming you have built that logic into Application.cfc like i
always do)

Lesson [B]  the fundamental problem was fixed with Kym's suggestion -
to break the string into separate simple variables and then
concatenate those.    I dont know why that should be necessary but
apparently it is.

Along the way I've  also learned that CFFILE doesnt appear to like
filenames with underscores in them, unless there's something else
preventing it from deleting that file.

One of the things this image processor CFC is doing is getting rid of
spaces and other characters i dont like in the file names.  Then it
resizes and copies the raw uploaded images to thumbnails and
mini-thumbnail directories etc for a product catalogue, and applies
logic to what to happen if the file already exists in one or more of
those directories.    Basically it's managing .product images for an
online catalogue i'm building.


Thanks for your help everyone.  I thought this was going to be a
simple 1-2 hour job to write a component to take care of  a routine
job and it's turned out to take a whole day to write.    AAAARRGGHH!!!


Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to