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 On Mon, Jun 1, 2009 at 4:22 PM, Kym Kovan <[email protected]> wrote: > > Chris Velevitch wrote: >> >> Are you sure the problem is not with the method? The way I see it, the >> method, whilst correctly determining the path, is doing something else >> before returning the path. > > Agreed Chris. > > Dump it Mike, Dump it :-) > > > -- > > Yours, > > Kym Kovan > mbcomms.net.au > > > > > -- --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
