[cfaussie] better class cahcing controls for cf9
What do people think about having per folder or application overrides for CF's template caching settings.. ie flag model glue or coldbox to be always completely cached as templates z -- Zac Spitzer - http://zacster.blogspot.com +61 405 847 168 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~--~~~~--~~--~--~---
[cfaussie] Re: Validating dates ... what's the trick?
AH! Ok i see what the difference is. You're giving it a string, not a date object. That's where I was falling over - i was trying ot give it a date object, and of course you can't create an invalid date object. So createdate was throwing an error before it even got to the validation function. Thanks. But the try/catch works too :) 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 Fri, Feb 20, 2009 at 4:03 PM, Adam Chapman wrote: > > Hi Mike, > > I used to use the 3 dropdowns method.. (now using jquery datepicker) but > used "mmm" for the month value. > > Then validate something like this > > isDate("#day#-#month#-#year#") which evaluates to isDate("31-Feb-2009") > > There was no confusion between day and month this way.. > > Regards, > Adam > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~--~~~~--~~--~--~---
[cfaussie] Re: Validating dates ... what's the trick?
Hi Mike, I used to use the 3 dropdowns method.. (now using jquery datepicker) but used "mmm" for the month value. Then validate something like this isDate("#day#-#month#-#year#") which evaluates to isDate("31-Feb-2009") There was no confusion between day and month this way.. Regards, Adam -Original Message- From: Mike Kear [mailto:afpwebwo...@gmail.com] Sent: Friday, February 20, 2009 3:56 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Validating dates ... what's the trick? The problem is i'm building the date from 3 dropdowns for day, month and year, so the day dropdown has 1-31 on it. Therefore it's possible to select 31/Feb/2009. Then if you try to validate the date from the form, by feeding those three values into the LSIsDate() function, or the IsValid(Date) or any other date function, first of all you have to give those functions a date object. To do that you use createdate() which chunders if you give it 31/Feb/2009So therefore the function LSIHisDate can never be tested on an invalid date (which is its main purpose for living after all) . This same point applies to IsDate() and IsValid("eurodate", ... and IsValid("date", ... ) because they take a date object as an argument, and you can't create an invalid date object. Unless i'm missing something here, it seems that these date validation functions have no use. The way you check validity of dates is to either design the form so people can't enter invalid dates (e.g. using a date picker) and/or using try/catch around the createdate() function. 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 Fri, Feb 20, 2009 at 3:46 PM, Chris Velevitch wrote: > > Did you try the LSIsDate function? > > > Chris > -- > Chris Velevitch > Manager - Adobe Platform Users Group, Sydney > m: 0415 469 095 > www.apugs.org.au > > Adobe Platform Users Group, Sydney > Feb '09 meeting: Hands On Cairngorm Basics > Date: Mon 23rd Feb 6pm for 6:30 start > Details and RSVP on http://groups.adobe.com/posts/d094878396 > > > > -- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~--~~~~--~~--~--~---
[cfaussie] Re: Validating dates ... what's the trick?
The problem is i'm building the date from 3 dropdowns for day, month and year, so the day dropdown has 1-31 on it. Therefore it's possible to select 31/Feb/2009. Then if you try to validate the date from the form, by feeding those three values into the LSIsDate() function, or the IsValid(Date) or any other date function, first of all you have to give those functions a date object. To do that you use createdate() which chunders if you give it 31/Feb/2009So therefore the function LSIsDate can never be tested on an invalid date (which is its main purpose for living after all) . This same point applies to IsDate() and IsValid("eurodate", ... and IsValid("date", ... ) because they take a date object as an argument, and you can't create an invalid date object. Unless i'm missing something here, it seems that these date validation functions have no use. The way you check validity of dates is to either design the form so people can't enter invalid dates (e.g. using a date picker) and/or using try/catch around the createdate() function. 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 Fri, Feb 20, 2009 at 3:46 PM, Chris Velevitch wrote: > > Did you try the LSIsDate function? > > > Chris > -- > Chris Velevitch > Manager - Adobe Platform Users Group, Sydney > m: 0415 469 095 > www.apugs.org.au > > Adobe Platform Users Group, Sydney > Feb '09 meeting: Hands On Cairngorm Basics > Date: Mon 23rd Feb 6pm for 6:30 start > Details and RSVP on http://groups.adobe.com/posts/d094878396 > > > > -- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~--~~~~--~~--~--~---
[cfaussie] Re: Validating dates ... what's the trick?
Did you try the LSIsDate function? Chris -- Chris Velevitch Manager - Adobe Platform Users Group, Sydney m: 0415 469 095 www.apugs.org.au Adobe Platform Users Group, Sydney Feb '09 meeting: Hands On Cairngorm Basics Date: Mon 23rd Feb 6pm for 6:30 start Details and RSVP on http://groups.adobe.com/posts/d094878396 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~--~~~~--~~--~--~---
[cfaussie] Re: Validating dates ... what's the trick?
I've been thinking about that too. I think i'll just wrap the createdate in a try/catch and forget IsValid. I'm not sure what the point is of creating such a function if it's never going to be able to be given an invalid date. Anyway thanks for your help everyone. I'll go the try/catch route. 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 Fri, Feb 20, 2009 at 3:26 PM, Adam Chapman wrote: > > I second Brett's method.. I do the same thang myself. > > Regards, > Adam > > > -Original Message- > From: Brett Payne-Rhodes [mailto:bret...@gmail.com] > Sent: Friday, February 20, 2009 3:17 PM > To: cfaussie@googlegroups.com > Subject: [cfaussie] Re: Validating dates ... what's the trick? > > > I could never get a reliable result from the various 'parsedate' > functions... > > In the end I wrote my own function to create dates from strings. It > looks for a variety of delimiters then extracts day, month, year; or > month, year, day; or even year, month, day; depending on how it was set > up. > > The trick at the end is to use createDate(year, month, day) wrapped up > in a try/catch. If it throws an error then you have a problem. > > hth > > Brett > B) > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~--~~~~--~~--~--~---
[cfaussie] Re: Validating dates ... what's the trick?
I second Brett's method.. I do the same thang myself. Regards, Adam -Original Message- From: Brett Payne-Rhodes [mailto:bret...@gmail.com] Sent: Friday, February 20, 2009 3:17 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Validating dates ... what's the trick? I could never get a reliable result from the various 'parsedate' functions... In the end I wrote my own function to create dates from strings. It looks for a variety of delimiters then extracts day, month, year; or month, year, day; or even year, month, day; depending on how it was set up. The trick at the end is to use createDate(year, month, day) wrapped up in a try/catch. If it throws an error then you have a problem. hth Brett B) Mike Kear wrote: > I'm trying to catch when a user inputs an invalid date from a set of > dropdowns for day/month/year. What's the trick to using > IsValid("eurodate", ? This doesnt work if the user enters > 31/2/2009: > > createdate(form.ShipYear,form.ShipMonth,form.ShipDay) )) > > Stuff > > > > If i feed this line the 'date' 31/2/2009 it doesnt do the stuff > inside the cfif, it throws an error with the helpful error message > 'MONTH'. I guess its because inside the IsValid() function, it's > trying to create the date first, and never getting to run the > isvalid() function. > > But if the IsValid() function will only work when it's given a valid > date, what is the point of it? -- Brett Payne-Rhodes Eaglehawk Computing t: +61 (0)8 9371-0471 m: +61 (0)414 371 047 e: br...@ehc.net.au w: http://www.yoursite.net.au --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~--~~~~--~~--~--~---
[cfaussie] Re: Validating dates ... what's the trick?
I could never get a reliable result from the various 'parsedate' functions... In the end I wrote my own function to create dates from strings. It looks for a variety of delimiters then extracts day, month, year; or month, year, day; or even year, month, day; depending on how it was set up. The trick at the end is to use createDate(year, month, day) wrapped up in a try/catch. If it throws an error then you have a problem. hth Brett B) Mike Kear wrote: > I'm trying to catch when a user inputs an invalid date from a set of > dropdowns for day/month/year. What's the trick to using > IsValid("eurodate", ? This doesnt work if the user enters > 31/2/2009: > > createdate(form.ShipYear,form.ShipMonth,form.ShipDay) )) > > Stuff > > > > If i feed this line the 'date' 31/2/2009 it doesnt do the stuff > inside the cfif, it throws an error with the helpful error message > 'MONTH'. I guess its because inside the IsValid() function, it's > trying to create the date first, and never getting to run the > isvalid() function. > > But if the IsValid() function will only work when it's given a valid > date, what is the point of it? -- Brett Payne-Rhodes Eaglehawk Computing t: +61 (0)8 9371-0471 m: +61 (0)414 371 047 e: br...@ehc.net.au w: http://www.yoursite.net.au --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~--~~~~--~~--~--~---
[cfaussie] Re: Validating dates ... what's the trick?
have you set the locale? I would be using the LS* functions for this stuff z On Fri, Feb 20, 2009 at 3:04 PM, Mike Kear wrote: > > I'm trying to catch when a user inputs an invalid date from a set of > dropdowns for day/month/year. What's the trick to using > IsValid("eurodate", ? This doesnt work if the user enters > 31/2/2009: > > createdate(form.ShipYear,form.ShipMonth,form.ShipDay) )) > > Stuff > > > > If i feed this line the 'date' 31/2/2009 it doesnt do the stuff > inside the cfif, it throws an error with the helpful error message > 'MONTH'. I guess its because inside the IsValid() function, it's > trying to create the date first, and never getting to run the > isvalid() function. > > But if the IsValid() function will only work when it's given a valid > date, what is the point of it? > -- > 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 > > > > -- Zac Spitzer - http://zacster.blogspot.com +61 405 847 168 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~--~~~~--~~--~--~---
[cfaussie] Validating dates ... what's the trick?
I'm trying to catch when a user inputs an invalid date from a set of dropdowns for day/month/year. What's the trick to using IsValid("eurodate", ? This doesnt work if the user enters 31/2/2009: Stuff If i feed this line the 'date' 31/2/2009 it doesnt do the stuff inside the cfif, it throws an error with the helpful error message 'MONTH'. I guess its because inside the IsValid() function, it's trying to create the date first, and never getting to run the isvalid() function. But if the IsValid() function will only work when it's given a valid date, what is the point of it? -- 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 cfaussie@googlegroups.com To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~--~~~~--~~--~--~---
[cfaussie] Re: CF8 bug with CFDOCUMENT
@Ray: sorry for the slow reply. I just tested it again and the "var" works fine. However bizarely if you call the local variable temp (as in you example) the string gets changed to "C:\Windows\Temp"! Truly odd! I'll leave it for the Adobe guys to sort it out. Hopefully they'll respond to my bug error log. On Feb 19, 12:17 am, Raymond Camden wrote: > So wait, you said you copied the arg. So I assume you did > > > > Is that what you did? I'm asking because you say at the end "I don't > think you can VAR the local variable." > > On Tue, Feb 17, 2009 at 9:34 PM, Matthew wrote: > > > Thanks Ryan and Ray for the responses. The code worked perfectly fine > > in CF7. I've just logged the bug with Adobe. > > > By the way: the simple fix is just to create a new local variable in > > the function and assign the argument variable to the local variable > > (it's a waste but at least it gets my code working again) - NOTE: I > > don't think you can VAR the local variable so it's still really a bug. > > > Cheers > > Matthew > > -- > === > Raymond Camden, VP of Software Dev, Broadchoice > > Email : r...@camdenfamily.com > Blog :www.coldfusionjedi.com > AOL IM : cfjedimaster > > Keep up to date with the community:http://www.coldfusionbloggers.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~--~~~~--~~--~--~---