Re: Should jsstringformat do more?
If enough people do so, I can almost guarantee that the Adobe dev staff will take notice, and look at including that or a similar function in the next version of cf. Based on experience with dealing with empty list elements in list functions, it may take a long time ;-) -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295696 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Woops, I've F***ed up my rich text editor.
Morning Rick, That did indeed appear to be the main problem mate, along with some funny characters in the JS file which got copied across when I copied and pasted from the browser. I've made those changes and it now appears to be working just peachy! Thanks mate, Rob -Original Message- From: Rick Faircloth [mailto:[EMAIL PROTECTED] Sent: 01 January 2008 13:45 To: CF-Talk Subject: RE: Woops, I've F***ed up my rich text editor. Hi, Robert... and happy new year! Your issue with the rich cftextarea and the file uploads sounds exactly like what happened with me. The solution for me was to further modify the config.cfm file (FCKeditor\editor\filemanager\upload\cfm\config.cfm) on line 30. I had to change the config.serverPath value to a hard coded value, since FCKeditor isn't running directly off the root of the application using it. I found notes concerning this one line 30 of that file. I stumbled upon them while looking for a solution to the same problem you seem to be having. You also have to change the config.serverPath value to the same value as above for the config.cfm file in FCKeditor\editor\filemanager\browser\default\connectors\cfm\config.cfm. If your situation meets the criteria for changing the config.serverPath as mentioned on line 30 of both the config.cfm files mentioned above, trying hard coding the config.serverPath to a local system value such as E:\inetpub\webroot\userfiles\ or whatever path leads to the userfiles folders you're using. Rick -Original Message- From: Robert Rawlins - Think Blue [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 01, 2008 8:13 AM To: CF-Talk Subject: Woops, I've F***ed up my rich text editor. Good morning guys! Happy new year to you all. So, 2008 is already causing me stress and woe :-D I'm hoping you guys can give me a hand. This morning I've been working on a small dynamic CMS for a friends site and took the new rich cftextarea out for the first time. It worked nicely! I then followed the steps on Rakshith's blog to get file uploads working on it, however I now seem to have broken the entire thing, after completing all the steps in the post I went to the page with my editor on it to find the editor not loading, just an empty white container, and a JavaScript error in the status bar of my browser. http://www.rakshith.net/blog/?p=41 I've gone over and over the steps in that blog article and can't see what it is that's causing me the issue, everything looks to be exactly as it should be. Has anyone got any ideas as to what's going wrong? Thanks, Rob ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295697 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
CF8, cfexecute getting return codes
Hello All, Happy New Year! Question: Iâm running CF8 using the cfexecute tag. Is there a way to capture return codes when using cfexecute against a bat file or when better yet calling a *exe directly in a Windows environment? Iâm try to run some SAS programs via the ColdFusion job scheduler I have it working great I just need to do some error handling using the return codes now. Love the CF! Regards, -Jim ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295698 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: 2008 conferences of interest
I'm really leaning towards this one. I've heard that it's a little more in-depth than CFUnited is. Can anyone confirm this? andy -Original Message- From: Sean Corfield [mailto:[EMAIL PROTECTED] Sent: Monday, December 31, 2007 9:40 PM To: CF-Talk Subject: Re: 2008 conferences of interest cf.Objective() 2008 has three hands on sessions this year: ColdSpring 1337, Agile Development and Advanced ColdBox. These are two hour sessions. In addition, there is a two hour Flex 3 for ColdFusion developers session (not hands on tho') as part of the RIA track. On 12/31/07, Dave Watts [EMAIL PROTECTED] wrote: How about Web Maniacs? http://www.webmaniacsconference.com/ It is still CF related, but also includes Flex/AIR. And, to toot our own horn so to speak, we have hands-on sessions; we're the only conference I know of that does this. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295699 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Extracting all tables into one Exel file
I have a dozen of tables in the sql 2000 db, and need to extract ALL rows of the tables with ALL column names into one Excel file (with a dozen of Worksheets) through cf page so that users can download the entire db as needed. thx much ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295700 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Extracting all tables into one Exel file
Since you need worksheets within an excel file, you'll probably have to use the Apache POI library. On Jan 2, 2008 9:38 AM, Tech Gate [EMAIL PROTECTED] wrote: I have a dozen of tables in the sql 2000 db, and need to extract ALL rows of the tables with ALL column names into one Excel file (with a dozen of Worksheets) through cf page so that users can download the entire db as needed. thx much ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295701 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Extracting all tables into one Exel file
this may be helpful to you http://www.bennadel.com/blog/474-ColdFusion-Component-Wrapper-For-POI-To-Read-And-Write-Excel-Files.htm - Christopher Vigliotti Sr ColdFusion Developer Goldbelt Raven On 1/2/08, Tech Gate [EMAIL PROTECTED] wrote: I have a dozen of tables in the sql 2000 db, and need to extract ALL rows of the tables with ALL column names into one Excel file (with a dozen of Worksheets) through cf page so that users can download the entire db as needed. thx much ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295702 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Should jsstringformat do more?
_New_ function, not a change (potentially breaking existing applications). On Jan 2, 2008 3:05 AM, Claude Schneegans [EMAIL PROTECTED] wrote: If enough people do so, I can almost guarantee that the Adobe dev staff will take notice, and look at including that or a similar function in the next version of cf. Based on experience with dealing with empty list elements in list functions, it may take a long time ;-) ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295703 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Woops, I've F***ed up my rich text editor.
Great! Glad it worked... Rick -Original Message- From: Robert Rawlins - Think Blue [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 02, 2008 7:53 AM To: CF-Talk Subject: RE: Woops, I've F***ed up my rich text editor. Morning Rick, That did indeed appear to be the main problem mate, along with some funny characters in the JS file which got copied across when I copied and pasted from the browser. I've made those changes and it now appears to be working just peachy! Thanks mate, Rob -Original Message- From: Rick Faircloth [mailto:[EMAIL PROTECTED] Sent: 01 January 2008 13:45 To: CF-Talk Subject: RE: Woops, I've F***ed up my rich text editor. Hi, Robert... and happy new year! Your issue with the rich cftextarea and the file uploads sounds exactly like what happened with me. The solution for me was to further modify the config.cfm file (FCKeditor\editor\filemanager\upload\cfm\config.cfm) on line 30. I had to change the config.serverPath value to a hard coded value, since FCKeditor isn't running directly off the root of the application using it. I found notes concerning this one line 30 of that file. I stumbled upon them while looking for a solution to the same problem you seem to be having. You also have to change the config.serverPath value to the same value as above for the config.cfm file in FCKeditor\editor\filemanager\browser\default\connectors\cfm\config.cfm. If your situation meets the criteria for changing the config.serverPath as mentioned on line 30 of both the config.cfm files mentioned above, trying hard coding the config.serverPath to a local system value such as E:\inetpub\webroot\userfiles\ or whatever path leads to the userfiles folders you're using. Rick ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295704 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: CF8, cfexecute getting return codes
If you mean whatever would have been returned in a cmd prompt, use the variable attribute and output that. You can pipe standard output and standard error into a file too: http://www.adrianlynch.co.uk/post.cfm?postID=22 Adrian -Original Message- From: James Blaha Sent: 02 January 2008 13:29 To: CF-Talk Subject: CF8, cfexecute getting return codes Hello All, Happy New Year! Question: Iâm running CF8 using the cfexecute tag. Is there a way to capture return codes when using cfexecute against a bat file or when better yet calling a *exe directly in a Windows environment? Iâm try to run some SAS programs via the ColdFusion job scheduler I have it working great I just need to do some error handling using the return codes now. Love the CF! Regards, -Jim ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295705 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Extracting all tables into one Exel file
Thank you, Chris. I need to download all of the tables regardless the order of columns since the order of columns are not important. In that case, I will not need to hard-code the column names as to there are a ton of column names. Do you know of solutions for this? Thx much On Jan 2, 2008 9:46 AM, Christopher Vigliotti [EMAIL PROTECTED] wrote: this may be helpful to you http://www.bennadel.com/blog/474-ColdFusion-Component-Wrapper-For-POI-To-Read-And-Write-Excel-Files.htm - Christopher Vigliotti Sr ColdFusion Developer Goldbelt Raven On 1/2/08, Tech Gate [EMAIL PROTECTED] wrote: I have a dozen of tables in the sql 2000 db, and need to extract ALL rows of the tables with ALL column names into one Excel file (with a dozen of Worksheets) through cf page so that users can download the entire db as needed. thx much ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295706 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Upload and Manipulate file
cffile.serverfile will give you the name of the uploaded file im interested how you are doing the conversion after that though Thanks, Dave. That was exactly the fix for it. And I'm using the Turbine Video Encoder SDK for this application. http://www.blue-pacific.com/products/turbinevideosdk/default.htm. No need to reinvent the wheel...especially when I have no idea of how to do so :). William: Thanks for the rundown of how it works, I suspected something like that--but didn't know the exact process. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295707 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Extracting all tables into one Exel file
cfquery gives you column names based on your sql select statement. If you really need to, then I guess cfdbinfo can give you additional information you're looking for. On Jan 2, 2008 10:21 AM, Tech Gate [EMAIL PROTECTED] wrote: Thank you, Chris. I need to download all of the tables regardless the order of columns since the order of columns are not important. In that case, I will not need to hard-code the column names as to there are a ton of column names. Do you know of solutions for this? Thx much ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295708 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Extracting all tables into one Exel file
no need to hard-code the col names. you can get the column names with a sql statement. there's a 'new fangled' way of doing this in cf8 as well here's the high-level of how i'd approach this. my code would 1. select the column names 2. loop through the column names in step one and 2a. run additional SELECT * sql statements to select all of the data 3. use ben's code to output each statement from step 2 into a new worksheet Regards, Chris - Christopher Vigliotti Sr ColdFusion Developer Goldbelt Raven On 1/2/08, Tech Gate [EMAIL PROTECTED] wrote: Thank you, Chris. I need to download all of the tables regardless the order of columns since the order of columns are not important. In that case, I will not need to hard-code the column names as to there are a ton of column names. Do you know of solutions for this? Thx much On Jan 2, 2008 9:46 AM, Christopher Vigliotti [EMAIL PROTECTED] wrote: this may be helpful to you http://www.bennadel.com/blog/474-ColdFusion-Component-Wrapper-For-POI-To-Read-And-Write-Excel-Files.htm - Christopher Vigliotti Sr ColdFusion Developer Goldbelt Raven On 1/2/08, Tech Gate [EMAIL PROTECTED] wrote: I have a dozen of tables in the sql 2000 db, and need to extract ALL rows of the tables with ALL column names into one Excel file (with a dozen of Worksheets) through cf page so that users can download the entire db as needed. thx much ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295709 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CF8, cfexecute getting return codes
Hi Adrian, I'm looking to get the standard error information. I'm trying to setup a tag I found called CFX_Execute this might do the trick. Thanks, -Jim ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295710 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
PayFlow Pro Timeout
I am trying to test a payflow pro account and the CFX tag times out with a -12 error. Here's the thing, though: it only takes a few seconds for the timeout to occur once the process is launched BUT there is a 45 second timeout in the tag attribute. Does this indicate anything about the timeout and why it is happening? Thanks, Ben .. Ben Nadel Certified Advanced ColdFusion MX7 Developer www.bennadel.com http://www.bennadel.com/ Need ColdFusion Help? www.bennadel.com/ask-ben/ ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295711 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CF8, cfexecute getting return codes
Hi All, I found a solution that seems to work using cfx_Execute to get the return codes. I posted my code below so it help others that come across this thread. If anyone has other ideas please let me know. CFX Tag Location: http://www.intrafoundation.com/software/ -Jim cfset sas_path = c:\Program Files\SAS\SAS 9.1\sas.exe cfset sas_prog = c:\temp\Import File.sas cfset sas_logf = c:\temp\mySAS_Log.txt cfset OraUserName = #REQUEST.DataSource1_UID# cfset OraPassWord = #REQUEST.DataSource1_UID_IPC# cfset OraDBInstance = #REQUEST.Oracle_SID# cfset ImportFilePath = c:\temp\ cfset ImportFileName = myfile.csv !--- Testing Code --- h3Run Windows SAS program/h3 pre cfoutput OraUserName:#OraUserName# OraPassWord:!--- #OraPassWord# --- OraDBInstance: #OraDBInstance# ImportFilePath: #ImportFilePath# ImportFileName: #ImportFileName# /cfoutput /pre !--- --- !--- --- !--- Old Method cfexecute name = #sas_path# arguments= -sysin #chr(34)##sas_prog##chr(34)# -log #chr(34)##sas_logf##chr(34)# -sysparm '#OraUserName# #OraPassWord# #OraDBInstance# #ImportFilePath# #ImportFileName#' timeout = 300 /cfexecute --- h1New Method/h1 cfx_Execute name=#sas_path# arguments=-sysin #chr(34)##sas_prog##chr(34)# -log #chr(34)##sas_logf##chr(34)# -sysparm '#OraUserName# #OraPassWord# #OraDBInstance# #ImportFilePath# #ImportFileName#' timeout=300 showdebug=no ExecuteReturnCode: cfoutput#ExecuteReturnCode#/cfoutputbr /br / !--- Check Return Code Status --- cfif #ExecuteReturnCode# EQ 0 cfset variables.msg = Your SAS Program ran successfully! cfelseif #ExecuteReturnCode# EQ 1 cfset variables.msg = WARNING: - There are SAS System Warnings, Please Check the SAS Log File (#sas_logf#)! cfelseif #ExecuteReturnCode# EQ 2 cfset variables.msg = ERROR: - There are SAS System Errors (you might have passed a bad variable) cfelseif #ExecuteReturnCode# EQ 3 cfset variables.msg = SAS Error Code 3 - Abort cfelseif #ExecuteReturnCode# EQ 4 cfset variables.msg = SAS Error Code 4 - Abort Return cfelseif #ExecuteReturnCode# EQ 5 cfset variables.msg = SAS Error Code 5 - Abort Abend /cfif cfoutputProgram Return Code: #variables.msg#/cfoutput !--- --- !--- --- ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295712 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
formating date
I have to use dates in an xml document. The date comes from the database like so. 2008-02-01 00:00:00.0 I need to get rid of the time and replace the dashes with periods to make the format as follows: 2008.02.01 This will be done inside a query loop of maybe 30 records with two dates each. Is there a regular expression that can do this or should I pull date parts out? Thanks, Mark ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295713 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: formating date
Uh... #dateFormat(theDate,'.mm.dd')# On Jan 2, 2008 3:02 PM, Mark Fuqua [EMAIL PROTECTED] wrote: I have to use dates in an xml document. The date comes from the database like so. 2008-02-01 00:00:00.0 I need to get rid of the time and replace the dashes with periods to make the format as follows: 2008.02.01 This will be done inside a query loop of maybe 30 records with two dates each. Is there a regular expression that can do this or should I pull date parts out? Thanks, Mark ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295715 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: formating date
On Jan 2, 2008 12:02 PM, Mark Fuqua [EMAIL PROTECTED] wrote: I have to use dates in an xml document. The date comes from the database like so. 2008-02-01 00:00:00.0 I need to get rid of the time and replace the dashes with periods to make the format as follows: 2008.02.01 dateFormat(myDate, '.mm.dd') ? -- Scientists tell us that the fastest animal on earth, with a top speed of 120 feet per second, is a cow that has been dropped out of a helicopter. - Dave Barry ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295714 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Flex to CF using Mapping
Dale, Flash remoting needs to be turned on and you need to have a channel setup in remoting config. Look at the file below and check out the adobe devnet at http://www.adobe.com/devnet/flex/flex_cf.html WEB-INF/flex/remoting-confi.xml ?xml version=1.0 encoding=UTF-8? service id=remoting-service class=flex.messaging.services.RemotingService messageTypes=flex.messaging.messages.RemotingMessage adapters adapter-definition id=cf-object class= coldfusion.flash.messaging.ColdFusionAdapter default=true/ adapter-definition id=java-object class= flex.messaging.services.remoting.adapters.JavaAdapter/ /adapters default-channels channel ref=my-cfamf/ /default-channels destination id=ColdFusion channels channel ref=my-cfamf/ /channels properties source*/source !-- define the resolution rules and access level of the cfc being invoked -- access !-- Use the ColdFusion mappings to find CFCs, by default only CFC files under your webroot can be found. -- use-mappingsfalse/use-mappings !-- allow public and remote or just remote methods to be invoked -- method-access-levelremote/method-access-level /access property-case !-- cfc property names -- force-cfc-lowercasefalse/force-cfc-lowercase !-- Query column names -- force-query-lowercasefalse/force-query-lowercase !-- struct keys -- force-struct-lowercasefalse/force-struct-lowercase /property-case /properties /destination /service On Jan 1, 2008 8:57 PM, Dale Fraser [EMAIL PROTECTED] wrote: I have done this before but can't get it to work this time (first time with CF8). I am using Flex to connect to CFC's via mapping. I have enabled mapping use in the XML and restarted the server but I get this error. [RPC Fault faultString=[MessagingError message='Destination 'ColdFusion' either does not exist or the destination has no channels defined (and the application does not define any default channels.)'] faultCode=InvokeFailed faultDetail=Couldn't establish a connection to 'ColdFusion'] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::invoke () [E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker. as:264] at mx.rpc.remoting.mxml::Operation/http://www.adobe.com/2006/flex/mx/internal:: invoke()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\src\mx\rpc\remoting \mxml\Operation.as:204] at mx.rpc.remoting::Operation/send ()[E:\dev\flex_3_beta3\sdk\frameworks\project s\rpc\src\mx\rpc\remoting\Operation.as:120] at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.rpc.remoting.mxml::Operation/send ()[E:\dev\flex_3_beta3\sdk\frameworks\pr ojects\rpc\src\mx\rpc\remoting\mxml\Operation.as:177] at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.rpc::AbstractService/http://www.adobe.com/2006/actionscript/flash/proxy:: callProperty()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\src\mx\rpc\Ab stractService.as:292] at DataGrid1/___DataGrid1_Button1_click()[F:\DataGrid1\src\DataGrid1.mxml:17] It seems to be asking for a Channel, but I want to using a mapping and not define channels. Regards Dale Fraser http://learncf.com ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295716 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Flex to CF using Mapping
Dale, Flash remoting needs to be turned on and you need to have a channel setup in remoting config. Look at the file below and check out the adobe devnet at http://www.adobe.com/devnet/flex/flex_cf.html *WEB-INF/flex/remoting-config.xml* default-channels channel ref=my-cfamf/ /default-channels destination id=ColdFusion channels channel ref=my-cfamf/ /channels properties source*/source !-- define the resolution rules and access level of the cfc being invoked -- access !-- Use the ColdFusion mappings to find CFCs, by default only CFC files under your webroot can be found. -- use-mappingsfalse/use-mappings !-- allow public and remote or just remote methods to be invoked -- method-access-levelremote/method-access-level /access ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295717 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
SQL Server connection best practice?
Hi all, I'm not even sure how to pose this question, so I did a poor job of searching the archives, if this question has already been answered. We're running CFMX7 and SQL Server 2000 in Windows2003 Server. I know there are a variety of ways that one can get CF to talk to a SQL Server box: ODBC, JDBC, Named Pipes, and so on. I don't even pretend to know what all of that really means. The question is what's the best practice these days? I think at one point, ODBC was faster, but then JDBC was recommended, and now I'm no longer sure. This came up because I ran a query in SQL Server query analyzer that returned the result set in 0 milliseconds. however, running it using CFQUERY (debugging enabled) showed that the query took about 800ms to execute. The recordset returned is pretty big, so I'm assuming that the bulk of the 800ms is the transfer time, and that got me to thinking about the above question. Any guidance is appreciated. Thanks, Ben ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295718 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: SQL Server connection best practice?
We're running CFMX7 and SQL Server 2000 in Windows2003 Server. I know there are a variety of ways that one can get CF to talk to a SQL Server box: ODBC, JDBC, Named Pipes, and so on. I don't even pretend to know what all of that really means. The question is what's the best practice these days? I think at one point, ODBC was faster, but then JDBC was recommended, and now I'm no longer sure. ColdFusion only supports JDBC, so you'll be using JDBC. You can either use a pure Java JDBC driver, or you can connect to ODBC datasources using SequeLink as a JDBC proxy of sorts. I'd strongly recommend using just JDBC. JDBC requires that your SQL Server be configured to listen on TCP/IP. It doesn't support Named Pipes. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295719 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: SQL Server connection best practice?
Okay, that's kind of what I thought. I think the SequeLink thing is what I was thinking of wrt to the ODBC driver. Thanks, Dave. ColdFusion only supports JDBC, so you'll be using JDBC. You can either use a pure Java JDBC driver, or you can connect to ODBC datasources using SequeLink as a JDBC proxy of sorts. I'd strongly recommend using just JDBC. JDBC requires that your SQL Server be configured to listen on TCP/IP. It doesn't support Named Pipes. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295720 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
another date format problem
This works #DateAdd(d, 7, 1/28/2008)# And this works #DateFormat(startdate, 'yyy.mm.dd')# I need to combine them. Take the variable startDate, add 7 days and format it like above in one expression. Is that possible? I know this is wrong, but something like this: #DateAdd(d, 7, DateFormat(startDate, 'yyy.mm.dd')# Is this what evaluate is for? Mark ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295721 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: another date format problem
no need for evaluate. just need to nest 'em properly. dateFormat(dateAdd('d', 7, startDate), 'yy.mm.dd') On Jan 2, 2008 1:49 PM, Mark Fuqua [EMAIL PROTECTED] wrote: This works #DateAdd(d, 7, 1/28/2008)# And this works #DateFormat(startdate, 'yyy.mm.dd')# I need to combine them. Take the variable startDate, add 7 days and format it like above in one expression. Is that possible? I know this is wrong, but something like this: #DateAdd(d, 7, DateFormat(startDate, 'yyy.mm.dd')# Is this what evaluate is for? Mark ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295722 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: another date format problem
If I read you right (add 7 days, then format the new value), something like this should work: #DateFormat(DateAdd(d, 7, startdate), 'yyy.mm.dd')# On Jan 2, 2008 3:49 PM, Mark Fuqua [EMAIL PROTECTED] wrote: This works #DateAdd(d, 7, 1/28/2008)# And this works #DateFormat(startdate, 'yyy.mm.dd')# I need to combine them. Take the variable startDate, add 7 days and format it like above in one expression. Is that possible? I know this is wrong, but something like this: #DateAdd(d, 7, DateFormat(startDate, 'yyy.mm.dd')# Is this what evaluate is for? Mark ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295723 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: another date format problem
You'd wrap the dateformat around the dateadd function, not inside it. #DateFormat(DateAdd(d,7,startDate),'yyy.mm.dd')# -Original Message- From: Mark Fuqua [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 02, 2008 3:49 PM To: CF-Talk Subject: another date format problem This works #DateAdd(d, 7, 1/28/2008)# And this works #DateFormat(startdate, 'yyy.mm.dd')# I need to combine them. Take the variable startDate, add 7 days and format it like above in one expression. Is that possible? I know this is wrong, but something like this: #DateAdd(d, 7, DateFormat(startDate, 'yyy.mm.dd')# Is this what evaluate is for? Mark ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295724 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: another date format problem
You want to do the DateAdd first (so put it on the inside), then the DateFormat: #DateFormat(DateAdd(d,7,startdate), yyy.mm.dd)# -- Josh - Original Message - From: Mark Fuqua [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Wednesday, January 02, 2008 1:49 PM Subject: another date format problem This works #DateAdd(d, 7, 1/28/2008)# And this works #DateFormat(startdate, 'yyy.mm.dd')# I need to combine them. Take the variable startDate, add 7 days and format it like above in one expression. Is that possible? I know this is wrong, but something like this: #DateAdd(d, 7, DateFormat(startDate, 'yyy.mm.dd')# Is this what evaluate is for? Mark ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295725 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: another date format problem
Thanks guys. -Original Message- From: Mark Fuqua [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 02, 2008 4:49 PM To: CF-Talk Subject: another date format problem This works #DateAdd(d, 7, 1/28/2008)# And this works #DateFormat(startdate, 'yyy.mm.dd')# I need to combine them. Take the variable startDate, add 7 days and format it like above in one expression. Is that possible? I know this is wrong, but something like this: #DateAdd(d, 7, DateFormat(startDate, 'yyy.mm.dd')# Is this what evaluate is for? Mark ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295726 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: SQL Server connection best practice?
Ben, Search House of fusion for a recent thread on query optimization as well... There was an interesting issue with a stored proc taking too long and it turned out to be permissions on the database (made me go hm.) -mark -Original Message- From: Ben Mueller [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 02, 2008 2:17 PM To: CF-Talk Subject: SQL Server connection best practice? Hi all, I'm not even sure how to pose this question, so I did a poor job of searching the archives, if this question has already been answered. We're running CFMX7 and SQL Server 2000 in Windows2003 Server. I know there are a variety of ways that one can get CF to talk to a SQL Server box: ODBC, JDBC, Named Pipes, and so on. I don't even pretend to know what all of that really means. The question is what's the best practice these days? I think at one point, ODBC was faster, but then JDBC was recommended, and now I'm no longer sure. This came up because I ran a query in SQL Server query analyzer that returned the result set in 0 milliseconds. however, running it using CFQUERY (debugging enabled) showed that the query took about 800ms to execute. The recordset returned is pretty big, so I'm assuming that the bulk of the 800ms is the transfer time, and that got me to thinking about the above question. Any guidance is appreciated. Thanks, Ben ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295727 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
mssql pagination
I can't imagine I'm the first person to try to do something like this, so hopefully you guys can give me some insight! I know this isn't strictly CF-related -- but I'm hoping some of you have tried to do something like this in the past. I'm trying to produce a paginated list of records. The query I'm working with has about 2 rows, and I'd rather not force the user to sift through all those pages in a single page request. So I'd like to break it up, maybe display 50 records per page. I'd also prefer not to have the full query sitting in memory every request. If I'm only displaying rows 50-100, I only want rows 50-100 in the query object. Using cfloop with startrow and maxrows won't cut it this time. Apparently this is super easy in MYSQL using the LIMIT (records), (offset) clause. Turns in MSSQL makes things difficult. A couple sites I hit up showed examples of using of subqueries and the TOP filter, or (ugh) temporary tables. I went with the subquery/TOP approach. For example, ordering by dateAdded and wanting to show rows 20-30: SELECT TOP 10 sampleID FROM Samples WHERE 0=0 AND sampleID NOT IN ( SELECT TOP 20 sampleID FROM Samples ORDER BY Samples.dateAdded ) ORDER BY Samples.dateAdded Grab the first 10 records after eliminating the first 20 records, always sorting by dateAdded. But I found it worked sporadically. Pages 1 and 2 worked fine, displaying the 1-10 and 11-20 records respectively. But page 3 gave me some strange results. It showed records 14-23 or some other mismatch. Obviously not what I was looking for! After some investigation, I found out my subquery was not returning the right samples to exlude. What I haven't been able to figure out is *why* they are not returning the right subset. As far as I can tell, the SQL looks good to me. So my question to you guys is -- 1. Can you see anything wrong with how I've set up my Query? 2. How have you dealt with pagination in the past? Is there an easier route than what I'm taking now? PS -- I am running on MSSQL Server 2000 (I have heard they offer an OFFSET clause in 2005, but sadly, I do not have access to that). If anyone is interested in seeing some sample data of what I'm working on, I put up this HTML page: http://www.vimm.com/developerTools/sampledata.html You can see in the All Samples section that records 20-30 should be: [147, 148, 149, 150, 63, 36, 40, 382, 383, 384]. But the Total Wrapper query returns: [146, 147, 148, 149, 150, 63, 382, 383, 384, 440]. What happened to record 40? It's row #27 in the All Samples query, but it's included in the exclude Nested Subquery that should only be pulling the top 20 results. How does that happen? Jonathon ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295728 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: mssql pagination
It's easy in SQL 2005, and very scalable for large rowsets: WITH PagedResultSet AS ( SELECT ROW_NUMBER() OVER(ORDER BY LastName ASC, FirstName ASC) AS RowNumber, UserID, Email, LastName, FirstName FROM ApplicationUser ) SELECT RowNumber, UserID, Email, LastName + ', ' + FirstName AS FullName FROM PagedResultSet WHERE RowNumber BETWEEN cfqueryparam value=#rangeStart# cfsqltype=CF_SQL_INTEGER AND cfqueryparam value=#rangeEnd# cfsqltype=CF_SQL_INTEGER ORDER BY LastName ASC, FirstName ASC This is *much* better than retrieving everything and letting it sit in memory for a number of reasons. Hope this helps. Respectfully, Adam Phillip Churvis President Productivity Enhancement -Original Message- From: Jonathon Stierman [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 02, 2008 6:01 PM To: CF-Talk Subject: mssql pagination I can't imagine I'm the first person to try to do something like this, so hopefully you guys can give me some insight! I know this isn't strictly CF-related -- but I'm hoping some of you have tried to do something like this in the past. I'm trying to produce a paginated list of records. The query I'm working with has about 2 rows, and I'd rather not force the user to sift through all those pages in a single page request. So I'd like to break it up, maybe display 50 records per page. I'd also prefer not to have the full query sitting in memory every request. If I'm only displaying rows 50-100, I only want rows 50-100 in the query object. Using cfloop with startrow and maxrows won't cut it this time. Apparently this is super easy in MYSQL using the LIMIT (records), (offset) clause. Turns in MSSQL makes things difficult. A couple sites I hit up showed examples of using of subqueries and the TOP filter, or (ugh) temporary tables. I went with the subquery/TOP approach. For example, ordering by dateAdded and wanting to show rows 20-30: SELECT TOP 10 sampleID FROM Samples WHERE 0=0 AND sampleID NOT IN ( SELECT TOP 20 sampleID FROM Samples ORDER BY Samples.dateAdded ) ORDER BY Samples.dateAdded Grab the first 10 records after eliminating the first 20 records, always sorting by dateAdded. But I found it worked sporadically. Pages 1 and 2 worked fine, displaying the 1-10 and 11-20 records respectively. But page 3 gave me some strange results. It showed records 14-23 or some other mismatch. Obviously not what I was looking for! After some investigation, I found out my subquery was not returning the right samples to exlude. What I haven't been able to figure out is *why* they are not returning the right subset. As far as I can tell, the SQL looks good to me. So my question to you guys is -- 1. Can you see anything wrong with how I've set up my Query? 2. How have you dealt with pagination in the past? Is there an easier route than what I'm taking now? PS -- I am running on MSSQL Server 2000 (I have heard they offer an OFFSET clause in 2005, but sadly, I do not have access to that). If anyone is interested in seeing some sample data of what I'm working on, I put up this HTML page: http://www.vimm.com/developerTools/sampledata.html You can see in the All Samples section that records 20-30 should be: [147, 148, 149, 150, 63, 36, 40, 382, 383, 384]. But the Total Wrapper query returns: [146, 147, 148, 149, 150, 63, 382, 383, 384, 440]. What happened to record 40? It's row #27 in the All Samples query, but it's included in the exclude Nested Subquery that should only be pulling the top 20 results. How does that happen? Jonathon ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295729 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: mssql pagination
It's easy in SQL 2005, and very scalable for large rowsets: snip I know you're running on 2000... just bite the bullet and upgrade to 2005. It's already 2008, and SQL Server 2008 is almost here. 2000 is more than a bit long in the tooth. Respectfully, Adam Phillip Churvis President Productivity Enhancement -Original Message- From: Adam Churvis [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 02, 2008 7:38 PM To: CF-Talk Subject: RE: mssql pagination ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295730 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Should jsstringformat do more?
_New_ function, not a change (potentially breaking existing applications). nope... won't break any existing applications... Honestly, I think I'm going to stop recommending people use jsstringformat in general and recommend they use SerializeJSON for string values instead... -- s. isaac dealey ^ new epoch isn't it time for a change? ph: 503.236.3691 http://onTap.riaforge.org/blog ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295731 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Should jsstringformat do more?
If anyone really feels strongly about this, they should create a function that does what they want, name it something more useful and specific, and place it on cflib.org function JSF(s) { return replacelist(s,,',/,\,\',\/); } The problem isn't that it can't be done -- the problem is that people (programmers) expect it to be bulletproof for a common situation which it's not... it could be... but there's some strange desire to not make it bulletproof based on a fear of ambiguous problems that might arise from fixing the specific problem that we know exists. Putting a note in the livedocs doesn't resolve the issue because the number of people that will reach will be miniscule. And even educating people that they shouldn't use jsstringformat isn't really something we should have to do. It should just be bulletproof *if* we can make it so without negative side effects, and it's been proven that we can. -- s. isaac dealey ^ new epoch isn't it time for a change? ph: 503.236.3691 http://onTap.riaforge.org/blog ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295732 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Should jsstringformat do more?
The problem isn't that it can't be done -- the problem is that people (programmers) expect it to be bulletproof for a common situation which it's not... it could be... I don't know why on earth you'd expect it to be bulletproof for a common situation, as opposed to behaving like every other *Format function. I don't know why you'd expect it to do anything other than replace metacharacters, since in the common parlance of most programmers I know, that's what it means to make a string safe for a specific environment. Maybe you should change your expectations. but there's some strange desire to not make it bulletproof based on a fear of ambiguous problems that might arise from fixing the specific problem that we know exists. Yes! I'm much more afraid of ambiguous problems that might be caused by a change, than I am by the ones I know how to easily solve. This is especially true for changes that go against the common idiom of a language, as this would. Maybe I'd be more interested if the current behavior was a serious problem, but it's not. How hard is it to deal with this one case? It should just be bulletproof *if* we can make it so without negative side effects, and it's been proven that we can. Just because you don't know that there are negative side effects, doesn't mean there aren't any. The word proof has a stricter meaning than that. In any case, since neither you nor I have access to the CF source code, I suggest you file a bug report/wishlist request/whatever and move on. Maybe you'll get what you want in CF9. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295733 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Should jsstringformat do more?
but there's some strange desire to not make it bulletproof based on a fear of ambiguous problems that might arise from fixing the specific problem that we know exists. Yes! I'm much more afraid of ambiguous problems that might be caused by a change, than I am by the ones I know how to easily solve. This is especially true for changes that go against the common idiom of a language, as this would. Maybe I'd be more interested if the current behavior was a serious problem, but it's not. How hard is it to deal with this one case? Very, because nobody expects it, therefore, nobody deals with it. Therefore in any given application that uses jsstringformat, the problem exists. However. The solution is tested and proven. Going against the common idiom isn't a relevant complaint in this case because a) the solution is proven to work b) the solution is proven not to cause other problems c) the current implementation which follows the common idiom results in the above problem, which exists in nearly 100% of applications that use jsstringformat. Meaning, there is a) there is a benefit to deviating from the common idiom b) there is no disadvantage to that deviation and c) there is no benefit to not deviating in this case. It should just be bulletproof *if* we can make it so without negative side effects, and it's been proven that we can. Just because you don't know that there are negative side effects, doesn't mean there aren't any. The word proof has a stricter meaning than that. Okay... you're a smart guy, arguably one of the smartest people working with ColdFusion. Give me a scenario in which escaping the / character will cause a problem in existing code. For example, the / character is being escaped by SerializeJSON -- although I don't know tha it's being escaped everywhere, it's definitely being escaped if it's found in a closing script tag. Show me an example of where properly replacing an existing case of jsstringformat with SerializeJSON on a string value would break something that's currently working. (That is, assuming that both instances are appropriate, analogous uses of the respective functions, i.e. quotes or not surrounding the function if necessary, htmleditformat() around them if they're in a tag attribute or not if they're in a CDATA segment, etc.) Hell, I'll make a public apology. I'd offer you a cash prize, but I can't afford one that would be large enough to create an incentive for you. We have as close as human beings can come to proof (which admittedly may not be all that close) in this case. In any case, since neither you nor I have access to the CF source code, I suggest you file a bug report/wishlist request/whatever and move on. Maybe you'll get what you want in CF9. Given that your attitude reflects the prevailing belief about it, I'd be really surprised if the CF team would disagree with you. -- s. isaac dealey ^ new epoch isn't it time for a change? ph: 503.236.3691 http://onTap.riaforge.org/blog ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295734 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4