Re: cfscript assistance
try these tools, you may have more luck http://carehart.org/cf411/#excel On Fri, Nov 15, 2013 at 2:35 PM, Stephens, Larry V steph...@iu.edu wrote: I've stayed away from cfscript but now I'm looking at it in conjunction with writing Excel spreadsheets. I looked at https://learn.adobe.com/wiki/display/coldfusionen/cfscriptand then https://learn.adobe.com/wiki/display/coldfusionen/Extending+ColdFusion+Pages+with+CFML+Scriptingbecause I thought perhaps CF10 is different than CF8. No joy on these pages. Google took me to http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=CFScript_03.html#1160935and there I see: cfscript // Loop through the qGetEmails RecordSet for (x = 1; x = qGetEmails.RecordCount; x=x+1) { This_id = qGetEmails.Emails_id[x]; I don't see anything specific to an if statement here. Here's my snippet (where GetB.bcode is from query GetB and xcampus is set above here): cfscript for ( x=1; x=GetB.Recordcount; x=x+1) { if GetB.bcode[x] NEQ xcampus { This throws an invalid construct error: ColdFusion was looking at the following text: GetB.bcode ? What am I missing? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357073 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript assistance
On Fri, Nov 15, 2013 at 9:35 AM, Stephens, Larry V steph...@iu.edu wrote: cfscript for ( x=1; x=GetB.Recordcount; x=x+1) { if GetB.bcode[x] NEQ xcampus { This throws an invalid construct error: ColdFusion was looking at the following text: GetB.bcode ? What am I missing? if ( GetB.bcode[x] != xcampus ) { // do something } ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357075 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript assistance
cfscript for ( x=1; x=GetB.Recordcount; x=x+1) { if GetB.bcode[x] NEQ xcampus { This throws an invalid construct error: ColdFusion was looking at the following text: GetB.bcode ? What am I missing? if ( GetB.bcode[x] != xcampus ) { // do something } And in an attempt to reduce future problems, it's worth pointing out that CFSCRIPT is basically JavaScript expression syntax with ColdFusion operators and functions. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357076 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: cfscript assistance
Thanks. See below -Original Message- From: Matt Quackenbush [mailto:quackfu...@gmail.com] Sent: Friday, November 15, 2013 9:45 AM To: cf-talk Subject: Re: cfscript assistance On Fri, Nov 15, 2013 at 9:35 AM, Stephens, Larry V steph...@iu.edu wrote: cfscript for ( x=1; x=GetB.Recordcount; x=x+1) { if GetB.bcode[x] NEQ xcampus { This throws an invalid construct error: ColdFusion was looking at the following text: GetB.bcode ? What am I missing? if ( GetB.bcode[x] != xcampus ) { // do something } I wondered about != vs NEQ but it throws the same error. At http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=CFScript_02.html the example uses NEQ inside cfscript ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357077 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: cfscript assistance
Ah - I missed part of Matt's response and Dave said the same thing. It was the () that was throwing the error. Should have seen that... Thanks. -Original Message- From: Matt Quackenbush [mailto:quackfu...@gmail.com] if GetB.bcode[x] NEQ xcampus { if ( GetB.bcode[x] != xcampus ) { // do something } ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357078 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript queries error in base.cfc
You get same error without the setName aspect: cfscript local.qryObj = new Query(datasource=PNGOasis); local.qryObj.setSQL( INSERT INTO PNGOasisExt.dbo.Test(testValue) VALUES ('test value') ); local.qryObj.execute(); /cfscript Error: 11:01:30.030 - Expression Exception - in C:/ColdFusion9/CustomTags/com/adobe/coldfusion/base.cfc : line 460 Cannot find qryname19596 key in structure. On Mon, Oct 14, 2013 at 7:49 AM, Nando d.na...@gmail.com wrote: I don't use setName() in my script based queries and it works. If I need a result back from the query, then I use a different variable name (v.perviousPayPeriod) from the one I use to construct and execute the query (v.payPerQ). Here's an example of some working code: v.payPerQ = new Query(); v.payPerQ.setSql( select paymentPeriodId from PaymentPeriod where startDateTime = :startDateTime and endDateTime = :endDateTime and isClosed = 1 ); v.payPerQ.addParam( name='startDateTime', value='#v.previousStartDateTime#', cfsqltype='cf_sql_timestamp' ); v.payPerQ.addParam( name='endDateTime', value='#v.previousEndDateTime#', cfsqltype='cf_sql_timestamp' ); v.previousPayPeriod= v.payPerQ.execute().getResult(); if (v.previousPayPeriod.RecordCount) { ... do something } else { ... do something else } On Mon, Oct 14, 2013 at 12:44 PM, Raymond Camden raymondcam...@gmail.com wrote: Two things. 1) Don't forget that the code behind the script based CFCs is not encrypted. You can look at base.cfc. 2) The issue seems to be this line: cfset tagResult.setResult(StructFind(variables,tagAttributes['name'])) But - it is wrapped in a try/catch, so you shouldn't be seeing it. If you get rid of the setname aspect, which I don't think you need, does it work ok? On Sun, Oct 13, 2013 at 9:59 PM, Kumar Shah shahku...@gmail.com wrote: This is the first time I am creating components wholly in cfscript. When running update or insert statements via the cfscript query functions an error gets recorded like: 22:52:17.017 - Expression Exception - in C:/ColdFusion9/CustomTags/com/adobe/coldfusion/base.cfc : line 460 Cannot find updSaveXML key in structure. The system still processes fine. The query runs, data gets saved, updated. I don't know why the error above gets reoorded. I ran a simple test with code: local.qryObj = new Query(datasource=PNGOasis); local.qryObj.setName(test); local.qryObj.setSQL( INSERT INTO PNGOasisExt.dbo.Test(testValue) VALUES ('test value') ); local.qryObj.execute(); Same Error: 22:58:48.048 - Expression Exception - in C:/ColdFusion9/CustomTags/com/adobe/coldfusion/base.cfc : line 460 Cannot find test key in structure. Thanks ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356920 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript queries error in base.cfc
Weird. Not that it matters, but try this mod: local.qryObj = new com.adobe.coldfusion.query(); local.qryObj.setDatasource(PNGOasis); then continue On Tue, Oct 15, 2013 at 10:02 AM, Kumar Shah shahku...@gmail.com wrote: You get same error without the setName aspect: cfscript local.qryObj = new Query(datasource=PNGOasis); local.qryObj.setSQL( INSERT INTO PNGOasisExt.dbo.Test(testValue) VALUES ('test value') ); local.qryObj.execute(); /cfscript Error: 11:01:30.030 - Expression Exception - in C:/ColdFusion9/CustomTags/com/adobe/coldfusion/base.cfc : line 460 Cannot find qryname19596 key in structure. On Mon, Oct 14, 2013 at 7:49 AM, Nando d.na...@gmail.com wrote: I don't use setName() in my script based queries and it works. If I need a result back from the query, then I use a different variable name (v.perviousPayPeriod) from the one I use to construct and execute the query (v.payPerQ). Here's an example of some working code: v.payPerQ = new Query(); v.payPerQ.setSql( select paymentPeriodId from PaymentPeriod where startDateTime = :startDateTime and endDateTime = :endDateTime and isClosed = 1 ); v.payPerQ.addParam( name='startDateTime', value='#v.previousStartDateTime#', cfsqltype='cf_sql_timestamp' ); v.payPerQ.addParam( name='endDateTime', value='#v.previousEndDateTime#', cfsqltype='cf_sql_timestamp' ); v.previousPayPeriod= v.payPerQ.execute().getResult(); if (v.previousPayPeriod.RecordCount) { ... do something } else { ... do something else } On Mon, Oct 14, 2013 at 12:44 PM, Raymond Camden raymondcam...@gmail.com wrote: Two things. 1) Don't forget that the code behind the script based CFCs is not encrypted. You can look at base.cfc. 2) The issue seems to be this line: cfset tagResult.setResult(StructFind(variables,tagAttributes['name'])) But - it is wrapped in a try/catch, so you shouldn't be seeing it. If you get rid of the setname aspect, which I don't think you need, does it work ok? On Sun, Oct 13, 2013 at 9:59 PM, Kumar Shah shahku...@gmail.com wrote: This is the first time I am creating components wholly in cfscript. When running update or insert statements via the cfscript query functions an error gets recorded like: 22:52:17.017 - Expression Exception - in C:/ColdFusion9/CustomTags/com/adobe/coldfusion/base.cfc : line 460 Cannot find updSaveXML key in structure. The system still processes fine. The query runs, data gets saved, updated. I don't know why the error above gets reoorded. I ran a simple test with code: local.qryObj = new Query(datasource=PNGOasis); local.qryObj.setName(test); local.qryObj.setSQL( INSERT INTO PNGOasisExt.dbo.Test(testValue) VALUES ('test value') ); local.qryObj.execute(); Same Error: 22:58:48.048 - Expression Exception - in C:/ColdFusion9/CustomTags/com/adobe/coldfusion/base.cfc : line 460 Cannot find test key in structure. Thanks ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356921 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript queries error in base.cfc
I see you are on CF9. Do you have a copy of CF10? If so, try copying over the CFCs. This may be something that was fixed. On Tue, Oct 15, 2013 at 10:13 AM, Raymond Camden raymondcam...@gmail.comwrote: Weird. Not that it matters, but try this mod: local.qryObj = new com.adobe.coldfusion.query(); local.qryObj.setDatasource(PNGOasis); then continue On Tue, Oct 15, 2013 at 10:02 AM, Kumar Shah shahku...@gmail.com wrote: You get same error without the setName aspect: cfscript local.qryObj = new Query(datasource=PNGOasis); local.qryObj.setSQL( INSERT INTO PNGOasisExt.dbo.Test(testValue) VALUES ('test value') ); local.qryObj.execute(); /cfscript Error: 11:01:30.030 - Expression Exception - in C:/ColdFusion9/CustomTags/com/adobe/coldfusion/base.cfc : line 460 Cannot find qryname19596 key in structure. On Mon, Oct 14, 2013 at 7:49 AM, Nando d.na...@gmail.com wrote: I don't use setName() in my script based queries and it works. If I need a result back from the query, then I use a different variable name (v.perviousPayPeriod) from the one I use to construct and execute the query (v.payPerQ). Here's an example of some working code: v.payPerQ = new Query(); v.payPerQ.setSql( select paymentPeriodId from PaymentPeriod where startDateTime = :startDateTime and endDateTime = :endDateTime and isClosed = 1 ); v.payPerQ.addParam( name='startDateTime', value='#v.previousStartDateTime#', cfsqltype='cf_sql_timestamp' ); v.payPerQ.addParam( name='endDateTime', value='#v.previousEndDateTime#', cfsqltype='cf_sql_timestamp' ); v.previousPayPeriod= v.payPerQ.execute().getResult(); if (v.previousPayPeriod.RecordCount) { ... do something } else { ... do something else } On Mon, Oct 14, 2013 at 12:44 PM, Raymond Camden raymondcam...@gmail.com wrote: Two things. 1) Don't forget that the code behind the script based CFCs is not encrypted. You can look at base.cfc. 2) The issue seems to be this line: cfset tagResult.setResult(StructFind(variables,tagAttributes['name'])) But - it is wrapped in a try/catch, so you shouldn't be seeing it. If you get rid of the setname aspect, which I don't think you need, does it work ok? On Sun, Oct 13, 2013 at 9:59 PM, Kumar Shah shahku...@gmail.com wrote: This is the first time I am creating components wholly in cfscript. When running update or insert statements via the cfscript query functions an error gets recorded like: 22:52:17.017 - Expression Exception - in C:/ColdFusion9/CustomTags/com/adobe/coldfusion/base.cfc : line 460 Cannot find updSaveXML key in structure. The system still processes fine. The query runs, data gets saved, updated. I don't know why the error above gets reoorded. I ran a simple test with code: local.qryObj = new Query(datasource=PNGOasis); local.qryObj.setName(test); local.qryObj.setSQL( INSERT INTO PNGOasisExt.dbo.Test(testValue) VALUES ('test value') ); local.qryObj.execute(); Same Error: 22:58:48.048 - Expression Exception - in C:/ColdFusion9/CustomTags/com/adobe/coldfusion/base.cfc : line 460 Cannot find test key in structure. Thanks ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356923 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript queries error in base.cfc
Two things. 1) Don't forget that the code behind the script based CFCs is not encrypted. You can look at base.cfc. 2) The issue seems to be this line: cfset tagResult.setResult(StructFind(variables,tagAttributes['name'])) But - it is wrapped in a try/catch, so you shouldn't be seeing it. If you get rid of the setname aspect, which I don't think you need, does it work ok? On Sun, Oct 13, 2013 at 9:59 PM, Kumar Shah shahku...@gmail.com wrote: This is the first time I am creating components wholly in cfscript. When running update or insert statements via the cfscript query functions an error gets recorded like: 22:52:17.017 - Expression Exception - in C:/ColdFusion9/CustomTags/com/adobe/coldfusion/base.cfc : line 460 Cannot find updSaveXML key in structure. The system still processes fine. The query runs, data gets saved, updated. I don't know why the error above gets reoorded. I ran a simple test with code: local.qryObj = new Query(datasource=PNGOasis); local.qryObj.setName(test); local.qryObj.setSQL( INSERT INTO PNGOasisExt.dbo.Test(testValue) VALUES ('test value') ); local.qryObj.execute(); Same Error: 22:58:48.048 - Expression Exception - in C:/ColdFusion9/CustomTags/com/adobe/coldfusion/base.cfc : line 460 Cannot find test key in structure. Thanks ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356918 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript queries error in base.cfc
I don't use setName() in my script based queries and it works. If I need a result back from the query, then I use a different variable name (v.perviousPayPeriod) from the one I use to construct and execute the query (v.payPerQ). Here's an example of some working code: v.payPerQ = new Query(); v.payPerQ.setSql( select paymentPeriodId from PaymentPeriod where startDateTime = :startDateTime and endDateTime = :endDateTime and isClosed = 1 ); v.payPerQ.addParam( name='startDateTime', value='#v.previousStartDateTime#', cfsqltype='cf_sql_timestamp' ); v.payPerQ.addParam( name='endDateTime', value='#v.previousEndDateTime#', cfsqltype='cf_sql_timestamp' ); v.previousPayPeriod= v.payPerQ.execute().getResult(); if (v.previousPayPeriod.RecordCount) { ... do something } else { ... do something else } On Mon, Oct 14, 2013 at 12:44 PM, Raymond Camden raymondcam...@gmail.comwrote: Two things. 1) Don't forget that the code behind the script based CFCs is not encrypted. You can look at base.cfc. 2) The issue seems to be this line: cfset tagResult.setResult(StructFind(variables,tagAttributes['name'])) But - it is wrapped in a try/catch, so you shouldn't be seeing it. If you get rid of the setname aspect, which I don't think you need, does it work ok? On Sun, Oct 13, 2013 at 9:59 PM, Kumar Shah shahku...@gmail.com wrote: This is the first time I am creating components wholly in cfscript. When running update or insert statements via the cfscript query functions an error gets recorded like: 22:52:17.017 - Expression Exception - in C:/ColdFusion9/CustomTags/com/adobe/coldfusion/base.cfc : line 460 Cannot find updSaveXML key in structure. The system still processes fine. The query runs, data gets saved, updated. I don't know why the error above gets reoorded. I ran a simple test with code: local.qryObj = new Query(datasource=PNGOasis); local.qryObj.setName(test); local.qryObj.setSQL( INSERT INTO PNGOasisExt.dbo.Test(testValue) VALUES ('test value') ); local.qryObj.execute(); Same Error: 22:58:48.048 - Expression Exception - in C:/ColdFusion9/CustomTags/com/adobe/coldfusion/base.cfc : line 460 Cannot find test key in structure. Thanks ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356919 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript zip example?
Any particular reason you don't use the cfzip tag from ColdFusion 8+? Sorry, that's probably not helpful, but hey sometimes people don't read the docs. If you're on Adobe software, I think nothing before CF8 is even supported anymore. nathan strutz [www.dopefly.com] [hi.im/nathanstrutz] [about.me/nathanstrutz] On Sun, Jun 24, 2012 at 7:36 PM, Paul Hastings p...@sustainablegis.comwrote: having a hard time getting my wooly head around the zip.cfc from cfcommunity. anyone know of any code examples for the action zip bits? thanks. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351673 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript zip example?
On 6/25/2012 1:07 PM, Nathan Strutz wrote: Any particular reason you don't use the cfzip tag from ColdFusion 8+? project CFCs are all in cfscript. Sorry, that's probably not helpful, but hey sometimes people don't read the docs. If you're on Adobe software, I think nothing before CF8 is even supported anymore. sorry, not following you. what? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351677 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript zip example?
Paul, Nathan is asking is there any reason you are not using ColdFusion 8 and its tag/script based support for zip, instead of a 3rd party library. -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/108193156965451149543 On Mon, Jun 25, 2012 at 6:13 PM, Paul Hastings p...@sustainablegis.comwrote: On 6/25/2012 1:07 PM, Nathan Strutz wrote: Any particular reason you don't use the cfzip tag from ColdFusion 8+? project CFCs are all in cfscript. Sorry, that's probably not helpful, but hey sometimes people don't read the docs. If you're on Adobe software, I think nothing before CF8 is even supported anymore. sorry, not following you. what? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351678 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript zip example?
There is no script support for cfzip. He is using a script based CFC. On Mon, Jun 25, 2012 at 4:08 AM, Andrew Scott andr...@andyscott.id.au wrote: Paul, Nathan is asking is there any reason you are not using ColdFusion 8 and its tag/script based support for zip, instead of a 3rd party library. -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/108193156965451149543 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351687 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript zip example?
Unless you're on Railo, of course. :-) http://wiki.getrailo.org/wiki/TAG:CFZIP On Mon, Jun 25, 2012 at 9:48 AM, Raymond Camden raymondcam...@gmail.comwrote: There is no script support for cfzip. He is using a script based CFC. On Mon, Jun 25, 2012 at 4:08 AM, Andrew Scott andr...@andyscott.id.au wrote: Paul, Nathan is asking is there any reason you are not using ColdFusion 8 and its tag/script based support for zip, instead of a 3rd party library. -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/108193156965451149543 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351688 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript zip example?
Ok, so to clarify, are you using the zip.cfc from https://github.com/CFCommunity/CFScript-Community-Components ? Sorry, I don't think I know Russ, who it looks like authored it. nathan strutz [www.dopefly.com] [hi.im/nathanstrutz] [about.me/nathanstrutz] On Mon, Jun 25, 2012 at 1:13 AM, Paul Hastings p...@sustainablegis.comwrote: On 6/25/2012 1:07 PM, Nathan Strutz wrote: Any particular reason you don't use the cfzip tag from ColdFusion 8+? project CFCs are all in cfscript. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351689 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript zip example?
Hmmm, for some reason I thought there had been some functions for zip... Oh well, more tags not converted to script that adobe think we don't use :-( -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/108193156965451149543 On Tue, Jun 26, 2012 at 12:48 AM, Raymond Camden raymondcam...@gmail.comwrote: There is no script support for cfzip. He is using a script based CFC. On Mon, Jun 25, 2012 at 4:08 AM, Andrew Scott andr...@andyscott.id.au wrote: Paul, Nathan is asking is there any reason you are not using ColdFusion 8 and its tag/script based support for zip, instead of a 3rd party library. -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/108193156965451149543 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351690 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript zip example?
To be fair, we've been expanded native script functionality _and_ the Script Stuff as CFCs in each release. It's getting there. On Mon, Jun 25, 2012 at 10:05 AM, Andrew Scott andr...@andyscott.id.au wrote: Hmmm, for some reason I thought there had been some functions for zip... Oh well, more tags not converted to script that adobe think we don't use :-( ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351691 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript zip example?
Yes, we can agree getting there. But would it have not been better to sit down and think that people are going to want cfscript version of everything, and hold of releasing until it is done and not 4 versions later? -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/108193156965451149543 On Tue, Jun 26, 2012 at 1:19 AM, Raymond Camden raymondcam...@gmail.comwrote: To be fair, we've been expanded native script functionality _and_ the Script Stuff as CFCs in each release. It's getting there. On Mon, Jun 25, 2012 at 10:05 AM, Andrew Scott andr...@andyscott.id.au wrote: Hmmm, for some reason I thought there had been some functions for zip... Oh well, more tags not converted to script that adobe think we don't use :-( ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351693 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript zip example?
But would it have not been better to sit down and think that people are going to want cfscript version of everything, and hold of releasing until it is done and not 4 versions later? Probably not - you can either get some things now, or maybe get everything later. Note the word maybe. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351694 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript zip example?
This topic has devolved a bit - let's see if we can actually help Paul Paul, are you just looking for an example of creating a zip file from let's say, a specific directory? I'd be happy to send you a couple of working examples if you tell just what you need it to do. =] -- Alan Rother Manager, Phoenix Cold Fusion User Group, www.AZCFUG.org Twitter: @AlanRother ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351695 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript zip example?
On 6/26/2012 1:35 AM, Raymond Camden wrote: Errr, yes, so sorry we couldn't do _everything_ people wanted in CF10. CF11 will have every feature requested. Ever. the cfcommunity's done a good job w/some of what was missing--it's just this one case where *i'm* not getting the syntax. you guys don't have to do it all alone. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351705 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript zip example?
On 6/25/2012 11:24 PM, Alan Rother wrote: This topic has devolved a bit - let's see if we can actually help Paul well since this list is also a part of the cf community, posting a few simple cfscript zip examples for all the function's actions would be a good idea. an even better one would be to add them to the cf community git whatever-it-is. and FYI i would have simply contacted the author (russplaysguitar) if github actually had functionality for that. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351707 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript zip example?
On Mon, Jun 25, 2012 at 8:14 PM, Paul Hastings p...@sustainablegis.com wrote: and FYI i would have simply contacted the author (russplaysguitar) if github actually had functionality for that. RIAForge let's you contact project owners! ;) -- === Raymond Camden, Adobe Developer Evangelist Email : raymondcam...@gmail.com Blog : www.raymondcamden.com Twitter: cfjedimaster ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351708 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript zip example?
If we have any takers, I would especially love it if someone would create a demo in the form of an MXUnit test case and issue a pull request. Anyone... ? In fact, if somebody makes a demo, I can make the test case for you and add it to the project. Paul's got a good idea though. We could really use some solid demos. Paul, why not add the missing test case and the missing demos as separate bug reports on github? They're both good ideas. nathan strutz [www.dopefly.com] [hi.im/nathanstrutz] [about.me/nathanstrutz] On Mon, Jun 25, 2012 at 6:14 PM, Paul Hastings p...@sustainablegis.comwrote: On 6/25/2012 11:24 PM, Alan Rother wrote: This topic has devolved a bit - let's see if we can actually help Paul well since this list is also a part of the cf community, posting a few simple cfscript zip examples for all the function's actions would be a good idea. an even better one would be to add them to the cf community git whatever-it-is. and FYI i would have simply contacted the author (russplaysguitar) if github actually had functionality for that. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351710 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript zip example?
On 6/26/2012 9:24 AM, Nathan Strutz wrote: Paul's got a good idea though. We could really use some solid demos. Paul, why not add the missing test case and the missing demos as separate bug reports on github? They're both good ideas. i would if i 100% understood it in the first place. don't have the time right now to figure it out, hence the email. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351711 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFScript Book
Right. I was talking about why _I_ generally don't like cfscript. But, honestly, if they don't really know how to do anything in javascript, then I'm not sure what they're doing writing CFML (or any web application development language). Scott On Tue, Feb 21, 2012 at 7:27 PM, Aaron Rouse aaron.ro...@gmail.com wrote: The people I was referring to I am certain do not know how to write anything or much of anything in JavaScript. So it is not a matter of CFScript confusing them into thinking it is JavaScript. -- - Scott Brady http://www.scottbrady.net/ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350020 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFScript Book
You might be surprised at how many people I come across in the industry who are making a good solid living writing CF apps but barely can write CSS, HTML, JavaScript and really even much in regards to SQL. Quite often though they are using some sort of CF framework or other core tool that a more advanced group of CF people developed. On Wed, Feb 22, 2012 at 4:50 AM, Scott Brady dsbr...@gmail.com wrote: Right. I was talking about why _I_ generally don't like cfscript. But, honestly, if they don't really know how to do anything in javascript, then I'm not sure what they're doing writing CFML (or any web application development language). Scott On Tue, Feb 21, 2012 at 7:27 PM, Aaron Rouse aaron.ro...@gmail.com wrote: The people I was referring to I am certain do not know how to write anything or much of anything in JavaScript. So it is not a matter of CFScript confusing them into thinking it is JavaScript. -- - Scott Brady http://www.scottbrady.net/ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350024 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFScript Book
As of CF9, the vast majority of CF can be written in script, if you desire. Almost every tag has a cfscript equivalent (I believe there were a few that didn't make the cut, but I can't recall which ones off-hand). Of course, some things are a bit more tedious doing them in script (such as outputting content and running queries). Scott On Mon, Feb 20, 2012 at 5:50 PM, Robert Rhodes rrhode...@gmail.com wrote: I do wish Adobe would fill out CF so that one could write mostly in cfscript and avoid cf tags altogether, if desired. It would also help when I end up around small-minded coders who scoff at CF merely because of the tags.On Mon, Feb 20, 2012 at 12:25 PM, Cameron Childress -- - Scott Brady http://www.scottbrady.net/ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349987 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFScript Book
Agreed and someone could always write themselves some custom functions as wrappers to CF tags for prior versions CF or perhaps even what is missing in the current. To a point at least. I have been a CFScript Nazi for well over a decade now but fully recognize a place for it and a place for when to use the tags. I very rarely use it for outputting things and can't say I really have had a need for much of the added tags-to-functions introduced in CF9. We though have many pre-CF9 servers so also does not make too much sense for me to write anything specific to CF9. On Tue, Feb 21, 2012 at 5:05 AM, Scott Brady dsbr...@gmail.com wrote: As of CF9, the vast majority of CF can be written in script, if you desire. Almost every tag has a cfscript equivalent (I believe there were a few that didn't make the cut, but I can't recall which ones off-hand). Of course, some things are a bit more tedious doing them in script (such as outputting content and running queries). Scott On Mon, Feb 20, 2012 at 5:50 PM, Robert Rhodes rrhode...@gmail.com wrote: I do wish Adobe would fill out CF so that one could write mostly in cfscript and avoid cf tags altogether, if desired. It would also help when I end up around small-minded coders who scoff at CF merely because of the tags.On Mon, Feb 20, 2012 at 12:25 PM, Cameron Childress -- - Scott Brady http://www.scottbrady.net/ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349993 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFScript Book
On Mon, Feb 20, 2012 at 7:50 PM, Robert Rhodes rrhode...@gmail.com wrote: I do wish Adobe would fill out CF so that one could write mostly in cfscript and avoid cf tags altogether, if desired. It would also help when I end up around small-minded coders who scoff at CF merely because of the tags. I've never changed my coding style to make a non-CF developer happy, seems a waste of time. If you prefer it, that's one thing, but you should never measure your own self worth by comments made by someone ignorant of the language. -Cameron -- Cameron Childress -- p: 678.637.5072 im: cameroncf facebook http://www.facebook.com/cameroncf | twitterhttp://twitter.com/cameronc | google+ https://profiles.google.com/u/0/117829379451708140985 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349994 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFScript Book
I have worked with CF developers who scoff at any CFScript usage but for reasons most would not assume. They did it because they flat out did not understand the syntax and I am not referring to some abundant overuse of CFScript here. It can sometimes be a balancing act of coding how you want and/or think you should v. staying employed and making some adjustments so others stay happy. On Tue, Feb 21, 2012 at 9:28 AM, Cameron Childress camer...@gmail.comwrote: On Mon, Feb 20, 2012 at 7:50 PM, Robert Rhodes rrhode...@gmail.com wrote: I do wish Adobe would fill out CF so that one could write mostly in cfscript and avoid cf tags altogether, if desired. It would also help when I end up around small-minded coders who scoff at CF merely because of the tags. I've never changed my coding style to make a non-CF developer happy, seems a waste of time. If you prefer it, that's one thing, but you should never measure your own self worth by comments made by someone ignorant of the language. -Cameron -- Cameron Childress -- p: 678.637.5072 im: cameroncf facebook http://www.facebook.com/cameroncf | twitterhttp://twitter.com/cameronc | google+ https://profiles.google.com/u/0/117829379451708140985 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350005 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFScript Book
You mean I should write a book on CFScript? Fantastic? Betascript Publishing hhhm... Anyone notice the tagline states: ColdFusion Markup Language, JavaScript, BlogCFC Now THAT is interesting... Steve 'Cutter' Blades Adobe Community Professional Adobe Certified Expert Advanced Macromedia ColdFusion MX 7 Developer http://cutterscrossing.com Co-Author Learning Ext JS 3.2 Packt Publishing 2010 https://www.packtpub.com/learning-ext-js-3-2-for-building-dynamic-desktop-style-user-interfaces/book The best way to predict the future is to help create it On 2/20/2012 10:48 AM, Robert Rhodes wrote: Hello to all. Are there any CFScript books out there? I ordered this onw but it was a complete joke. A total waste of money: http://www.barnesandnoble.com/w/cfscript-lambert-m-surhone/1026883099. All suggestions welcome. -RR ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350006 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFScript Book
Yeah, or how about the red seal on the cover that says High Quality Content by WIKIPEDIA articles!? LOL :-D On 2/21/2012 11:04 AM, Steve 'Cutter' Blades wrote: You mean I should write a book on CFScript? Fantastic? Betascript Publishing hhhm... Anyone notice the tagline states: ColdFusion Markup Language, JavaScript, BlogCFC Now THAT is interesting... Steve 'Cutter' Blades Adobe Community Professional Adobe Certified Expert Advanced Macromedia ColdFusion MX 7 Developer http://cutterscrossing.com Co-Author Learning Ext JS 3.2 Packt Publishing 2010 https://www.packtpub.com/learning-ext-js-3-2-for-building-dynamic-desktop-style-user-interfaces/book The best way to predict the future is to help create it On 2/20/2012 10:48 AM, Robert Rhodes wrote: Hello to all. Are there any CFScript books out there? I ordered this onw but it was a complete joke. A total waste of money: http://www.barnesandnoble.com/w/cfscript-lambert-m-surhone/1026883099. All suggestions welcome. -RR ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350008 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFScript Book
This publisher releases something like 10,000+ titles a year: they scrape Wikipedia content and sell it. http://en.wikipedia.org/wiki/VDM_Publishing Billy Cravens bdcrav...@gmail.com On Feb 21, 2012, at 1:19 PM, Carl Von Stetten wrote: Yeah, or how about the red seal on the cover that says High Quality Content by WIKIPEDIA articles!? LOL :-D On 2/21/2012 11:04 AM, Steve 'Cutter' Blades wrote: You mean I should write a book on CFScript? Fantastic? Betascript Publishing hhhm... Anyone notice the tagline states: ColdFusion Markup Language, JavaScript, BlogCFC Now THAT is interesting... Steve 'Cutter' Blades Adobe Community Professional Adobe Certified Expert Advanced Macromedia ColdFusion MX 7 Developer http://cutterscrossing.com Co-Author Learning Ext JS 3.2 Packt Publishing 2010 https://www.packtpub.com/learning-ext-js-3-2-for-building-dynamic-desktop-style-user-interfaces/book The best way to predict the future is to help create it On 2/20/2012 10:48 AM, Robert Rhodes wrote: Hello to all. Are there any CFScript books out there? I ordered this onw but it was a complete joke. A total waste of money: http://www.barnesandnoble.com/w/cfscript-lambert-m-surhone/1026883099. All suggestions welcome. -RR ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350013 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFScript Book
My main issue with cfscript is that it's easy to confuse at first glance between that and javascript (for cases when you have JS mixed in with CF code, as the legacy app I work on at work has). So, it's not really cfscript's fault as much as a personal bugaboo. Scott On Tue, Feb 21, 2012 at 11:35 AM, Aaron Rouse aaron.ro...@gmail.com wrote: I have worked with CF developers who scoff at any CFScript usage but for reasons most would not assume. They did it because they flat out did not understand the syntax and I am not referring to some abundant overuse of CFScript here. It can sometimes be a balancing act of coding how you want and/or think you should v. staying employed and making some adjustments so others stay happy. -- - Scott Brady http://www.scottbrady.net/ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350014 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFScript Book
cfscript to many defeats the who point of why they chose cf in the first place, because it was a html like easy to learn tag based language. When you go down the route of doing all your code in script, using OOP style coding, then surely you would just be better off writing directly in JAVA ? On Wed, Feb 22, 2012 at 12:55 AM, Scott Brady dsbr...@gmail.com wrote: My main issue with cfscript is that it's easy to confuse at first glance between that and javascript (for cases when you have JS mixed in with CF code, as the legacy app I work on at work has). So, it's not really cfscript's fault as much as a personal bugaboo. Scott On Tue, Feb 21, 2012 at 11:35 AM, Aaron Rouse aaron.ro...@gmail.com wrote: I have worked with CF developers who scoff at any CFScript usage but for reasons most would not assume. They did it because they flat out did not understand the syntax and I am not referring to some abundant overuse of CFScript here. It can sometimes be a balancing act of coding how you want and/or think you should v. staying employed and making some adjustments so others stay happy. -- - Scott Brady http://www.scottbrady.net/ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350015 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFScript Book
Well, nobody's better off writing in Java, but C# would be an alternative. On Wednesday, February 22, 2012, Russ Michaels wrote: cfscript to many defeats the who point of why they chose cf in the first place, because it was a html like easy to learn tag based language. When you go down the route of doing all your code in script, using OOP style coding, then surely you would just be better off writing directly in JAVA ? -- -- Shu Ha Ri: Agile and .NET blog http://www.bifrost.com.au/ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350016 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFScript Book
The people I was referring to I am certain do not know how to write anything or much of anything in JavaScript. So it is not a matter of CFScript confusing them into thinking it is JavaScript. On Tue, Feb 21, 2012 at 6:55 PM, Scott Brady dsbr...@gmail.com wrote: My main issue with cfscript is that it's easy to confuse at first glance between that and javascript (for cases when you have JS mixed in with CF code, as the legacy app I work on at work has). So, it's not really cfscript's fault as much as a personal bugaboo. Scott On Tue, Feb 21, 2012 at 11:35 AM, Aaron Rouse aaron.ro...@gmail.com wrote: I have worked with CF developers who scoff at any CFScript usage but for reasons most would not assume. They did it because they flat out did not understand the syntax and I am not referring to some abundant overuse of CFScript here. It can sometimes be a balancing act of coding how you want and/or think you should v. staying employed and making some adjustments so others stay happy. -- - Scott Brady http://www.scottbrady.net/ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350017 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFScript Book
On Mon, Feb 20, 2012 at 10:48 AM, Robert Rhodes rrhode...@gmail.com wrote: Are there any CFScript books out there? I ordered this onw but it was a complete joke. A total waste of money: http://www.barnesandnoble.com/w/cfscript-lambert-m-surhone/1026883099. Is there a reason you want to only learn CFScript? The CFML language has so many tags and many ways of doing things. Learning only CFScript may not serve you well. Attempting to use all tags or all script is probably not the best goal IMHO. Having said that, the Adobe docs are a good starting point for learning CFScript, but if you want more than that I'd look at a regular ole CF Book like CFWACK, and then look for a CFScript equivalent for what you're doing if you really need/want one. -Cameron -- Cameron Childress -- p: 678.637.5072 im: cameroncf facebook http://www.facebook.com/cameroncf | twitterhttp://twitter.com/cameronc | google+ https://profiles.google.com/u/0/117829379451708140985 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349964 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFScript Book
For what its worth I have a cfscript cheatsheet here: http://www.petefreitag.com/cheatsheets/coldfusion/cfscript/ It lists much but certainly not all of what you need to know to use cfscript. Feedback, suggestions welcome. -- Pete Freitag - Adobe Community Professional http://foundeo.com/ - ColdFusion Consulting Products http://petefreitag.com/ - My Blog http://hackmycf.com - Is your ColdFusion Server Secure? On Mon, Feb 20, 2012 at 12:25 PM, Cameron Childress camer...@gmail.comwrote: On Mon, Feb 20, 2012 at 10:48 AM, Robert Rhodes rrhode...@gmail.com wrote: Are there any CFScript books out there? I ordered this onw but it was a complete joke. A total waste of money: http://www.barnesandnoble.com/w/cfscript-lambert-m-surhone/1026883099. Is there a reason you want to only learn CFScript? The CFML language has so many tags and many ways of doing things. Learning only CFScript may not serve you well. Attempting to use all tags or all script is probably not the best goal IMHO. Having said that, the Adobe docs are a good starting point for learning CFScript, but if you want more than that I'd look at a regular ole CF Book like CFWACK, and then look for a CFScript equivalent for what you're doing if you really need/want one. -Cameron -- Cameron Childress -- p: 678.637.5072 im: cameroncf facebook http://www.facebook.com/cameroncf | twitterhttp://twitter.com/cameronc | google+ https://profiles.google.com/u/0/117829379451708140985 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349969 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFScript Book
Hi Cameron. I know CF very well. I been coding in it for many years. But, I admit, I am a little tagged out. Cfscript feels more elegant, and as I learn more and more javascript, it seems a natural time to try to get completely up to speed on cfscript. I do wish Adobe would fill out CF so that one could write mostly in cfscript and avoid cf tags altogether, if desired. It would also help when I end up around small-minded coders who scoff at CF merely because of the tags. Yes, I have answers for those types, like how I can produce the same apps they can, but in 1/3 the time, or how Adobe puts a lot of development into the language, which gets us big upgrades every few years -- or how we can get a live body on the phone when we need one. But still, I really want to be a cfscripter, and I am looking for a path to make that happen. There must be at least a few chapters in some book out there somewhere, no? Pete, thank you very much for the cheat sheet. That will come in handy. -RR On Mon, Feb 20, 2012 at 12:25 PM, Cameron Childress camer...@gmail.comwrote: On Mon, Feb 20, 2012 at 10:48 AM, Robert Rhodes rrhode...@gmail.com wrote: Are there any CFScript books out there? I ordered this onw but it was a complete joke. A total waste of money: http://www.barnesandnoble.com/w/cfscript-lambert-m-surhone/1026883099. Is there a reason you want to only learn CFScript? The CFML language has so many tags and many ways of doing things. Learning only CFScript may not serve you well. Attempting to use all tags or all script is probably not the best goal IMHO. Having said that, the Adobe docs are a good starting point for learning CFScript, but if you want more than that I'd look at a regular ole CF Book like CFWACK, and then look for a CFScript equivalent for what you're doing if you really need/want one. -Cameron -- Cameron Childress -- p: 678.637.5072 im: cameroncf facebook http://www.facebook.com/cameroncf | twitterhttp://twitter.com/cameronc | google+ https://profiles.google.com/u/0/117829379451708140985 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349983 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFScript help
I'm attemping to create a function that adds spaces either in front of or behind a string. Hi Josh, a couple of things. First, ColdFusion has the LJustify(), RJustify(), and CJustify() functions which will do exactly what you're trying to accomplish already built in. Second, your function (at a glance) appears that it would work, but when you say you're only getting one space are you referring to the actual output, or just what you see on the browser screen after the page has been rendered? Remember that in HTML, multiple spaces (or other whitespace in the output code) will get truncated down to a single space. You could wrap the output with pre/pre tags to force it to show all of the whitespace as it exists in the code, or append the HTML character entity for a space instead (nbsp;) to force multiple spaces to show in the output rendering. -Justin ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346927 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFScript help
If you're displaying this in a browser, then HTML is likely the culprit, condensing multiple spaces into just one. Use non-breaking spaces (or wrap your output in pre tags) to get HTML to output multiple spaces. On Mon, Aug 22, 2011 at 11:19 AM, Josh Cesana joshuaces...@yahoo.comwrote: I'm attemping to create a function that adds spaces either in front of or behind a string. For example, I want this test string to have 6 spaces after it, plus the 4 characters in test for a total of 10 characters. I have an align variable for both left and right alignment for the spaces. So far, the only result I get is 'test ' instead of 'test ' CFSCRIPT function spaceFiller(cell, fill, align) { var newcell = ; if (len(cell) EQ 0) { cell = ; } newcell = cell; for (i=1; i EQ len(fill - (len(cell))); i=i+1) { if (align EQ R) { newcell =newcell; } else { newcell = newcell ; } } return (newcell); } /CFSCRIPT cfoutput 10 characters - align left: '#spaceFiller(test,10,L)#' /cfoutput The result I get is 'test ' and what I want is 'test ' Any help would be much appreciated - thanks in advance. -J ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346928 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFScript help
just off the top of my head: function spaceFiller(cell, fill, align) { var space = RepeatString(' ', fill - Len(Cell)); return iif(align eq 'R', de(space cell), de(cell space)); } You may need to deal with the scenario of cell having more characters than the value of fill. Also, if you're spitting out html and want the space to be visible, use white-space:pre in the css of the containing element. On 22 August 2011 17:19, Josh Cesana joshuaces...@yahoo.com wrote: I'm attemping to create a function that adds spaces either in front of or behind a string. For example, I want this test string to have 6 spaces after it, plus the 4 characters in test for a total of 10 characters. I have an align variable for both left and right alignment for the spaces. So far, the only result I get is 'test ' instead of 'test ' CFSCRIPT function spaceFiller(cell, fill, align) { var newcell = ; if (len(cell) EQ 0) { cell = ; } newcell = cell; for (i=1; i EQ len(fill - (len(cell))); i=i+1) { if (align EQ R) { newcell =newcell; } else { newcell = newcell ; } } return (newcell); } /CFSCRIPT cfoutput 10 characters - align left: '#spaceFiller(test,10,L)#' /cfoutput The result I get is 'test ' and what I want is 'test ' Any help would be much appreciated - thanks in advance. -J ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346929 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFScript help
Wow: LJustify(), RJustify(), and CJustify() functions. Who woulda thunk it. Brilliant. I guess. On 22 August 2011 17:37, Justin Scott leviat...@darktech.org wrote: I'm attemping to create a function that adds spaces either in front of or behind a string. Hi Josh, a couple of things. First, ColdFusion has the LJustify(), RJustify(), and CJustify() functions which will do exactly what you're trying to accomplish already built in. Second, your function (at a glance) appears that it would work, but when you say you're only getting one space are you referring to the actual output, or just what you see on the browser screen after the page has been rendered? Remember that in HTML, multiple spaces (or other whitespace in the output code) will get truncated down to a single space. You could wrap the output with pre/pre tags to force it to show all of the whitespace as it exists in the code, or append the HTML character entity for a space instead (nbsp;) to force multiple spaces to show in the output rendering. -Justin ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346930 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFScript help
Wow: LJustify(), RJustify(), and CJustify() functions. Who woulda thunk it. Brilliant. I guess. Whenever I'm working with people relatively new to CF my number one piece of advice is to become very familiar with the function reference so you don't spend a bunch of time re-writing functions that are already built-in. I recall one new developer back in 2001 who spent nearly a day working on a function and ran into a snag. He asked me for help and after looking over his code for a moment I replaced his entire file with one line, a function CF already had which would do the same thing (getProfileString() in that case since he was trying to read and parse .ini files). Granted, the function list has grown by leaps and bounds with more recent releases so even more experienced developers may not be fully up-to-date in that area. The white-space directive in CSS isn't something I was aware of so even I am constantly learning. :) -Justin ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346932 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFScript help
Thanks all - the built in function is exactly what I needed. I am fairly new to CF so I will definitely spend time learning the functions. Thanks again. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346933 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript based components formatting
On Mon, Nov 15, 2010 at 7:18 PM, Sean Corfield wrote: ... (it doesn't affect my position that comments should never change the semantics of code - although, as noted by Ray, the example given only affects metadata so it would only affect the semantics of a program that tested that metadata... in other words, it could still change the behavior of code!) I like JavaDoc. =) Something just strikes me as weird when I see hint=a lot of stuff, maybe even hyperlinks and you know, * bullets * and * whatnot, all sorta mixed in there. I like the idea of going with something that works with the semantics of the ultimate program, the programmer. Maybe other people don't mind that kind of thing though. Yes, JavaDoc rocks, IMHO. =) :Den -- Man is a wingless animal with two feet and flat nails. Plato ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339344 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript based components formatting
Sorry - what? On Mon, Nov 15, 2010 at 10:33 PM, Andrew Scott andr...@andyscott.id.au wrote: No annotations in the comments was mentioned to be slower than using the other way. Regards, Andrew Scott http://www.andyscott.id.au/ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339278 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript based components formatting
I go with the first route as Sean Corfield has made what I consider to be a very excellent point, which is that comments should never have effect on the executing code. Comments are for documentation only. Judah On Mon, Nov 15, 2010 at 10:15 AM, John Allen johnfal...@gmail.com wrote: Hey CFers This might be a silly question: how are you all formatting your cfcsript based cfcs? Using annotations or defining the attributes in the method itself? EG: // methodOne *public* boolean *function* foo() displayname=I am Foo description=I return a boolean value. I am for testing. hint=I return a boolean value.{ *return* 1; } /** *...@hint I return an empty structure. *...@displayname Bar *...@description I return an empty structure. */ *public* struct *function* bar() { *return* *structNew*(); } ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339243 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript based components formatting
No comments driving behavior! :-) ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339246 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript based components formatting
/* This is me agreeing */ I agree! On Mon, Nov 15, 2010 at 3:35 PM, Matt Quackenbush quackfu...@gmail.comwrote: No comments driving behavior! :-) ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339247 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript based components formatting
I agree too - although in this case the comments just impact metadata. displayname/description/hint are only used in auto-display. On Mon, Nov 15, 2010 at 4:42 PM, Charlie Griefer charlie.grie...@gmail.com wrote: /* This is me agreeing */ I agree! On Mon, Nov 15, 2010 at 3:35 PM, Matt Quackenbush quackfu...@gmail.comwrote: No comments driving behavior! :-) ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339249 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: cfscript based components formatting
Method one, there is a performance hit when using notations. Regards, Andrew Scott http://www.andyscott.id.au/ -Original Message- From: John Allen [mailto:johnfal...@gmail.com] Sent: Tuesday, 16 November 2010 5:16 AM To: cf-talk Subject: cfscript based components formatting Hey CFer's This might be a silly question: how are you all formatting your cfcsript based cfc's? Using annotations or defining the attributes in the method itself? EG: // methodOne *public* boolean *function* foo() displayname=I am Foo description=I return a boolean value. I am for testing. hint=I return a boolean value.{ *return* 1; } /** *...@hint I return an empty structure. *...@displayname Bar *...@description I return an empty structure. */ *public* struct *function* bar() { *return* *structNew*(); } ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339250 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript based components formatting
Thanks for the advice. I like method one. On Mon, Nov 15, 2010 at 5:58 PM, Andrew Scott andr...@andyscott.id.auwrote: Method one, there is a performance hit when using notations. Regards, Andrew Scott http://www.andyscott.id.au/ -Original Message- From: John Allen [mailto:johnfal...@gmail.com] Sent: Tuesday, 16 November 2010 5:16 AM To: cf-talk Subject: cfscript based components formatting Hey CFer's This might be a silly question: how are you all formatting your cfcsript based cfc's? Using annotations or defining the attributes in the method itself? EG: // methodOne *public* boolean *function* foo() displayname=I am Foo description=I return a boolean value. I am for testing. hint=I return a boolean value.{ *return* 1; } /** *...@hint I return an empty structure. *...@displayname Bar *...@description I return an empty structure. */ *public* struct *function* bar() { *return* *structNew*(); } ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339252 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript based components formatting
On Mon, Nov 15, 2010 at 2:58 PM, Andrew Scott andr...@andyscott.id.au wrote: Method one, there is a performance hit when using notations. Is there? Why so? (it doesn't affect my position that comments should never change the semantics of code - although, as noted by Ray, the example given only affects metadata so it would only affect the semantics of a program that tested that metadata... in other words, it could still change the behavior of code!) -- Sean A Corfield -- (904) 302-SEAN Railo Technologies, Inc. -- http://getrailo.com/ An Architect's View -- http://corfield.org/ If you're not annoying somebody, you're not really alive. -- Margaret Atwood ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339258 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: cfscript based components formatting
Don't do that to me Sean, I was actually quoting something you said on something similar to this some months ago. Are you saying there isn't now? Regards, Andrew Scott http://www.andyscott.id.au/ -Original Message- From: Sean Corfield [mailto:seancorfi...@gmail.com] Sent: Tuesday, 16 November 2010 1:18 PM To: cf-talk Subject: Re: cfscript based components formatting On Mon, Nov 15, 2010 at 2:58 PM, Andrew Scott andr...@andyscott.id.au wrote: Method one, there is a performance hit when using notations. Is there? Why so? (it doesn't affect my position that comments should never change the semantics of code - although, as noted by Ray, the example given only affects metadata so it would only affect the semantics of a program that tested that metadata... in other words, it could still change the behavior of code!) -- Sean A Corfield -- (904) 302-SEAN Railo Technologies, Inc. -- http://getrailo.com/ An Architect's View -- http://corfield.org/ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339262 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript based components formatting
I would assume _any_ metadata would make parsing the CFC slower. So this: cffunction name=foo a=1 b=2 c=3 is slower than cffunction name=foo However - I'd question if it was _significantly_ slower. My guess would be no. I'd imagine the 'slower' one would be 1ms slower probably. On Mon, Nov 15, 2010 at 9:01 PM, Andrew Scott andr...@andyscott.id.au wrote: Don't do that to me Sean, I was actually quoting something you said on something similar to this some months ago. Are you saying there isn't now? Regards, Andrew Scott http://www.andyscott.id.au/ -Original Message- From: Sean Corfield [mailto:seancorfi...@gmail.com] Sent: Tuesday, 16 November 2010 1:18 PM To: cf-talk Subject: Re: cfscript based components formatting On Mon, Nov 15, 2010 at 2:58 PM, Andrew Scott andr...@andyscott.id.au wrote: Method one, there is a performance hit when using notations. Is there? Why so? (it doesn't affect my position that comments should never change the semantics of code - although, as noted by Ray, the example given only affects metadata so it would only affect the semantics of a program that tested that metadata... in other words, it could still change the behavior of code!) -- Sean A Corfield -- (904) 302-SEAN Railo Technologies, Inc. -- http://getrailo.com/ An Architect's View -- http://corfield.org/ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339264 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: cfscript based components formatting
No annotations in the comments was mentioned to be slower than using the other way. Regards, Andrew Scott http://www.andyscott.id.au/ -Original Message- From: Raymond Camden [mailto:rcam...@gmail.com] Sent: Tuesday, 16 November 2010 2:56 PM To: cf-talk Subject: Re: cfscript based components formatting I would assume _any_ metadata would make parsing the CFC slower. So this: cffunction name=foo a=1 b=2 c=3 is slower than cffunction name=foo However - I'd question if it was _significantly_ slower. My guess would be no. I'd imagine the 'slower' one would be 1ms slower probably. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339268 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfscript for cfsetting
Which would be odd, since I believe the claim for CF9 was that you can theoretically do everything in cfscript (though writing queries blows in it, you can still do it). Scott On Tue, Jan 26, 2010 at 1:17 PM, Jason Durham jdur...@cti-stl.com wrote: That link is for the CFML equivalents in CFScript. If it's not there... there is no equivalent. :) -- - Scott Brady http://www.scottbrady.net ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330173 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfscript for cfsetting
That's the rub theoretically everything ;) Hopefully it will continue to grow until it hits 100%. On Wed, Jan 27, 2010 at 5:24 AM, Scott Brady dsbr...@gmail.com wrote: Which would be odd, since I believe the claim for CF9 was that you can theoretically do everything in cfscript (though writing queries blows in it, you can still do it). Scott ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330176 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfscript for cfsetting
The CF9 docs have had this ever since CF9 was released. http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSe9cbe5cf462523a02805926a1237efcbfd5-7fff.html ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330143 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfscript for cfsetting
sorry, I saw that page before, but I could not find cfsetting, or is it somewhere buried there? On Tue, Jan 26, 2010 at 10:23 AM, Matt Quackenbush quackfu...@gmail.comwrote: The CF9 docs have had this ever since CF9 was released. http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSe9cbe5cf462523a02805926a1237efcbfd5-7fff.html ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330150 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: cfscript for cfsetting
That link is for the CFML equivalents in CFScript. If it's not there... there is no equivalent. :) -Original Message- From: Carol F [mailto:cfcn...@gmail.com] Sent: Tuesday, January 26, 2010 2:04 PM To: cf-talk Subject: Re: cfscript for cfsetting sorry, I saw that page before, but I could not find cfsetting, or is it somewhere buried there? On Tue, Jan 26, 2010 at 10:23 AM, Matt Quackenbush quackfu...@gmail.comwrote: The CF9 docs have had this ever since CF9 was released. http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSe9cbe5cf462523a02805926a1237efcbfd5-7fff.html ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330153 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfscript for cfsetting
I would try doing a cfdump and see what that gets you cfdump var=#setting()# Next I would try to guess the order of the arguments if it does exist or You can write your own function for it using something like so and inject it into your CFC or include it as a UDF. I would imagine that this would work. cffunction name=mysetting output=false returntype=void cfargument name=attributecollection required=false type=struct default=#structnew()# cfargument name=enablecfoutputonly required=false type=string default=false cfargument name=requesttimeout required=false default=60 cfargument name=showdebugoutput required=false default=false cfsetting attributecollection=#arguments.attributecollection# enablecfoutputonly=#arguments.enablecfoutputonly# setting requesttimeout=#arguments.requesttimeout# showdebugoutput=#arguments.showdebugoutput# /cffunction And call it like so mysetting(); HTH G! On Tue, Jan 26, 2010 at 3:03 PM, Carol F cfcn...@gmail.com wrote: sorry, I saw that page before, but I could not find cfsetting, or is it somewhere buried there? On Tue, Jan 26, 2010 at 10:23 AM, Matt Quackenbush quackfu...@gmail.com wrote: The CF9 docs have had this ever since CF9 was released. http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSe9cbe5cf462523a02805926a1237efcbfd5-7fff.html ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330154 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfscript for cfsetting
Ok thanks everyone! On Tue, Jan 26, 2010 at 12:17 PM, Jason Durham jdur...@cti-stl.com wrote: That link is for the CFML equivalents in CFScript. If it's not there... there is no equivalent. :) -Original Message- From: Carol F [mailto:cfcn...@gmail.com] Sent: Tuesday, January 26, 2010 2:04 PM To: cf-talk Subject: Re: cfscript for cfsetting sorry, I saw that page before, but I could not find cfsetting, or is it somewhere buried there? On Tue, Jan 26, 2010 at 10:23 AM, Matt Quackenbush quackfu...@gmail.com wrote: The CF9 docs have had this ever since CF9 was released. http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSe9cbe5cf462523a02805926a1237efcbfd5-7fff.html ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330160 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFScript - what's the advantage?
Isn't a cfloop from=x to =y index=i step=z a counter loop? Yes, it is. The difference is that the implementation is slightly less flexible than the script version, but only slightly so, and only noticeably so in edge cases that most of us will never see or touch or even hear about. x = blah; ... some other stuff ... for (; x mod 7 neq 3; x *= sqrt(pi)) { } You wouldn't be able to increment x by multiplying it by the square root of pi for example, you can only increment it by adding a signed integer value. And similarly the to attribute is a number, rather than a formula the way it is in a script loop, so you wouldn't be able to do x mod 7 neq 3 as the formula for completion either, because the tag loop is limited to checking or x number. But because most of us will never see or touch or even hear about these kinds of cases where that sort of thing is actually useful, the tag-loop is synonymous in well over 99% of cases. I don't know that this particular pseudocode would actually run or work - probably not - or it would create an infinite loop maybe - but it's really just meant to be an example. ;) -- s. isaac dealey ^ new epoch isn't it time for a change? ph: 817.385.0301 http://onTap.riaforge.org/blog ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326887 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFScript - what's the advantage?
One of the reasons that Adobe have quoted is to ease migration from other languages. Attracting more developers being the goal. Personally, my eyes prefer cfscript stylee unless I'm outputting html / xml. Dominic 2009/10/5 Mike Kear afpwebwo...@gmail.com I've been trying to see what's the benefit of enhancing CFScript. There are a couple of reasons I can think of, but am I missing something? Are there more significant reasons for enhancing CFScript than I have here? Like for example performance issues? [A] I like to code using a javascript-like syntax i.e personal preference [B] if we are going to have a script-style syntax at all, it ought to be fully featured with all functions available so developers dont have to switch back and forth. [C] there are 'snobs' who think that tag-based coding isn't real coding and having a script language satisfies their need for a real programming language. Is there another reason to code in the CFScript rather than tags?? -- 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 ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326891 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFScript - what's the advantage?
Faster to read and type when working with blocks of code. cfset var = '' vs var = ''; The other thing I like is that it enforces more of a MVC approach. Less variable declaration nested inside of your output tags and you'll find yourself writing logic outside of the HTML output. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326907 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: CFScript - what's the advantage?
I would generally agree that cfscript is prettier and easier to read and we should be able to do everything in cfscript. I would more likely use it for component development where output is not typical, and the ability to build whole cfcs in cfscript is cool. Rick ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326927 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFScript - what's the advantage?
You can't express a true counter (for) loop with CFLOOP, only a condition loop (while). So that's one reason. Probably the reason I use it most often, even over reducing verbosity. Beyond verbosity and a couple edge cases, I think it's pretty much entirely personal preference. cheers, barneyb -- Barney Boisvert bboisv...@gmail.com http://www.barneyb.com/ On Oct 4, 2009, at 10:05 PM, Mike Kear afpwebwo...@gmail.com wrote: I've been trying to see what's the benefit of enhancing CFScript. There are a couple of reasons I can think of, but am I missing something? Are there more significant reasons for enhancing CFScript than I have here? Like for example performance issues? [A] I like to code using a javascript-like syntax i.e personal preference [B] if we are going to have a script-style syntax at all, it ought to be fully featured with all functions available so developers dont have to switch back and forth. [C] there are 'snobs' who think that tag-based coding isn't real coding and having a script language satisfies their need for a real programming language. Is there another reason to code in the CFScript rather than tags?? -- 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 ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326885 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFScript - what's the advantage?
Isn't a cfloop from=x to =y index=i step=z a counter loop? mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ 2009/10/5 Barney Boisvert bboisv...@gmail.com: You can't express a true counter (for) loop with CFLOOP, only a condition loop (while). So that's one reason. Probably the reason I use it most often, even over reducing verbosity. Beyond verbosity and a couple edge cases, I think it's pretty much entirely personal preference. cheers, barneyb -- Barney Boisvert bboisv...@gmail.com http://www.barneyb.com/ On Oct 4, 2009, at 10:05 PM, Mike Kear afpwebwo...@gmail.com wrote: I've been trying to see what's the benefit of enhancing CFScript. There are a couple of reasons I can think of, but am I missing something? Are there more significant reasons for enhancing CFScript than I have here? Like for example performance issues? [A] I like to code using a javascript-like syntax i.e personal preference [B] if we are going to have a script-style syntax at all, it ought to be fully featured with all functions available so developers dont have to switch back and forth. [C] there are 'snobs' who think that tag-based coding isn't real coding and having a script language satisfies their need for a real programming language. Is there another reason to code in the CFScript rather than tags?? -- 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 ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326886 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFScript for loop broken? (aka HELP!!)
@Daniel, Glad that worked for you. Out of curiosity, don't you need LTE (rather than just LT) to get your full loop? A bit OT, but seems like you'd be missing some results if you only have the LT test? cfscript test = [test1,test2]; for (awesomevariable = 1; awesomevariable LTE (ArrayLen(test)); awesomevariable = awesomevariable + 1) { writeOutput(test[awesomevariable]); } /cfscript Jason, Oops! You are correct. I knew there was no way I could go posting some code to the list with out fat fingering it. It is actually LTE in my code. In other news my problem is totally solved by switching from JRockit to the Hotspot JVM. I'm not sure what exactly the issue was but I imagine it's related to 64 bit some how. I ran today with a full load and no issues. Thanks for everyone's input! Dancing merrily, Daniel ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315752 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: CFScript for loop broken? (aka HELP!!)
Oops, forgot to sign off I was so frustrated. Thanks in advance to anyone who hopefully has a couple of minutes to tell me this is something obvious. Daniel Jimenez Thanks in advance for any advice anyone can give. I'm having a very odd problem where, after running for a period of time, all for loops in CFScript break. What I have is the following very, very simple sample code below: cfset test = [test1,test2] cfscript for(awesomevariable=1; awesomevariable LT (ArrayLen(test)); awesomevariable = awesomevariable+1) { writeOutput(test[awesomevariable]); } /cfscript Under normal circumstances (and using an empty application.cfc), this will print test1test2 to the browser. However after a period of time or possibly load this exact code will start throwing the error The element at position 3 of dimension 1, of array variable TEST, cannot be found. The server will continue throwing this error until I restart jBoss. I have two CF 8.0.1 Enterprise servers running on 64-bit JRockit R27.5.0 on jBoss 4.2.3. This problem eventually happens on both servers. It's driving me crazy as it takes a bit of load on the server before the problem manifests itself. Further more this only happens with a for loop inside of a cfscript, this does NOT happen inside of a cfloop! It seems the cfscript for loop can't count, as it attempts to access the 3rd position in a 2 position array. When the problem does finally crop up it eventually breaks my application (for example we use http://cflib.org/udf/CapFirstTitle on a number of pages). What's makes this even more of a mystery is that I'm running all of this EXACT same code on my current production servers which are configured the same with the exception of being 32 bit machines. These servers sit under heavy load all day with no issue. Has anyone seen anything like this before? We are using the 64 bit Coldfusion 8 (it sure would be nice if you could confirm this in CFIDE by the way). The JVM has a ton of free memory left in the heap, and I've seen the heap get much larger without causing this issue. Does this seem like a CF bug to anyone else? Is anyone else using 64 bit ColdFusion? I'm not really sure if 64 bit is the culprit, but it's really my only variable in comparison to my production servers. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315559 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: CFScript for loop broken? (aka HELP!!)
Is that code in a CFC that uses 'awesomevariable' and/or 'test' as a variable name within another method? If so, just var-scope everything and the problem should vanish. cheers, barneyb On Wed, Nov 19, 2008 at 9:38 AM, Daniel Jimenez [EMAIL PROTECTED] wrote: Thanks in advance for any advice anyone can give. I'm having a very odd problem where, after running for a period of time, all for loops in CFScript break. What I have is the following very, very simple sample code below: cfset test = [test1,test2] cfscript for(awesomevariable=1; awesomevariable LT (ArrayLen(test)); awesomevariable = awesomevariable+1) { writeOutput(test[awesomevariable]); } /cfscript Under normal circumstances (and using an empty application.cfc), this will print test1test2 to the browser. However after a period of time or possibly load this exact code will start throwing the error The element at position 3 of dimension 1, of array variable TEST, cannot be found. The server will continue throwing this error until I restart jBoss. I have two CF 8.0.1 Enterprise servers running on 64-bit JRockit R27.5.0 on jBoss 4.2.3. This problem eventually happens on both servers. It's driving me crazy as it takes a bit of load on the server before the problem manifests itself. Further more this only happens with a for loop inside of a cfscript, this does NOT happen inside of a cfloop! It seems the cfscript for loop can't count, as it attempts to access the 3rd position in a 2 position array. When the problem does finally crop up it eventually breaks my application (for example we use http://cflib.org/udf/CapFirstTitle on a number of pages). What's makes this even more of a mystery is that I'm running all of this EXACT same code on my current production servers which are configured the same with the exception of being 32 bit machines. These servers sit under heavy load all day with no issue. Has anyone seen anything like this before? We are using the 64 bit Coldfusion 8 (it sure would be nice if you could confirm this in CFIDE by the way). The JVM has a ton of free memory left in the heap, and I've seen the heap get much larger without causing this issue. Does this seem like a CF bug to anyone else? Is anyone else using 64 bit ColdFusion? I'm not really sure if 64 bit is the culprit, but it's really my only variable in comparison to my production servers. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315562 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: CFScript for loop broken? (aka HELP!!)
Barney, Unusual syntax for a for loop... Looks more like a while loop. I would have expected something like... for(awesomevariable=1; awesomevariable LT (ArrayLen(test); awesomevariable++) { } I would sort of expect your example to throw an error. I don't think that's your problem, since it seems more related to scoping if test is reporting undefined ... but it is unusual to my eye. If I were to try and do it the way your code seems to want to do it I would do: Awesomevariable = 0; While(awesomevariable LT arraylen(test)) { awesomevariable++; // whatever else you are doing... } -Mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com -Original Message- From: Barney Boisvert [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 19, 2008 12:29 PM To: cf-talk Subject: Re: CFScript for loop broken? (aka HELP!!) Is that code in a CFC that uses 'awesomevariable' and/or 'test' as a variable name within another method? If so, just var-scope everything and the problem should vanish. cheers, barneyb On Wed, Nov 19, 2008 at 9:38 AM, Daniel Jimenez [EMAIL PROTECTED] wrote: Thanks in advance for any advice anyone can give. I'm having a very odd problem where, after running for a period of time, all for loops in CFScript break. What I have is the following very, very simple sample code below: cfset test = [test1,test2] cfscript for(awesomevariable=1; awesomevariable LT (ArrayLen(test)); awesomevariable = awesomevariable+1) { writeOutput(test[awesomevariable]); } /cfscript Under normal circumstances (and using an empty application.cfc), this will print test1test2 to the browser. However after a period of time or possibly load this exact code will start throwing the error The element at position 3 of dimension 1, of array variable TEST, cannot be found. The server will continue throwing this error until I restart jBoss. I have two CF 8.0.1 Enterprise servers running on 64-bit JRockit R27.5.0 on jBoss 4.2.3. This problem eventually happens on both servers. It's driving me crazy as it takes a bit of load on the server before the problem manifests itself. Further more this only happens with a for loop inside of a cfscript, this does NOT happen inside of a cfloop! It seems the cfscript for loop can't count, as it attempts to access the 3rd position in a 2 position array. When the problem does finally crop up it eventually breaks my application (for example we use http://cflib.org/udf/CapFirstTitle on a number of pages). What's makes this even more of a mystery is that I'm running all of this EXACT same code on my current production servers which are configured the same with the exception of being 32 bit machines. These servers sit under heavy load all day with no issue. Has anyone seen anything like this before? We are using the 64 bit Coldfusion 8 (it sure would be nice if you could confirm this in CFIDE by the way). The JVM has a ton of free memory left in the heap, and I've seen the heap get much larger without causing this issue. Does this seem like a CF bug to anyone else? Is anyone else using 64 bit ColdFusion? I'm not really sure if 64 bit is the culprit, but it's really my only variable in comparison to my production servers. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315565 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: CFScript for loop broken? (aka HELP!!)
Doh! ... Never mind - I see now I was fooled by the line break. I now admit I have nothing to add and I will sheepishly withdraw :) Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com -Original Message- From: Mark Kruger [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 19, 2008 12:42 PM To: cf-talk Subject: RE: CFScript for loop broken? (aka HELP!!) Barney, Unusual syntax for a for loop... Looks more like a while loop. I would have expected something like... for(awesomevariable=1; awesomevariable LT (ArrayLen(test); awesomevariable++) { } I would sort of expect your example to throw an error. I don't think that's your problem, since it seems more related to scoping if test is reporting undefined ... but it is unusual to my eye. If I were to try and do it the way your code seems to want to do it I would do: Awesomevariable = 0; While(awesomevariable LT arraylen(test)) { awesomevariable++; // whatever else you are doing... } -Mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com -Original Message- From: Barney Boisvert [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 19, 2008 12:29 PM To: cf-talk Subject: Re: CFScript for loop broken? (aka HELP!!) Is that code in a CFC that uses 'awesomevariable' and/or 'test' as a variable name within another method? If so, just var-scope everything and the problem should vanish. cheers, barneyb On Wed, Nov 19, 2008 at 9:38 AM, Daniel Jimenez [EMAIL PROTECTED] wrote: Thanks in advance for any advice anyone can give. I'm having a very odd problem where, after running for a period of time, all for loops in CFScript break. What I have is the following very, very simple sample code below: cfset test = [test1,test2] cfscript for(awesomevariable=1; awesomevariable LT (ArrayLen(test)); awesomevariable = awesomevariable+1) { writeOutput(test[awesomevariable]); } /cfscript Under normal circumstances (and using an empty application.cfc), this will print test1test2 to the browser. However after a period of time or possibly load this exact code will start throwing the error The element at position 3 of dimension 1, of array variable TEST, cannot be found. The server will continue throwing this error until I restart jBoss. I have two CF 8.0.1 Enterprise servers running on 64-bit JRockit R27.5.0 on jBoss 4.2.3. This problem eventually happens on both servers. It's driving me crazy as it takes a bit of load on the server before the problem manifests itself. Further more this only happens with a for loop inside of a cfscript, this does NOT happen inside of a cfloop! It seems the cfscript for loop can't count, as it attempts to access the 3rd position in a 2 position array. When the problem does finally crop up it eventually breaks my application (for example we use http://cflib.org/udf/CapFirstTitle on a number of pages). What's makes this even more of a mystery is that I'm running all of this EXACT same code on my current production servers which are configured the same with the exception of being 32 bit machines. These servers sit under heavy load all day with no issue. Has anyone seen anything like this before? We are using the 64 bit Coldfusion 8 (it sure would be nice if you could confirm this in CFIDE by the way). The JVM has a ton of free memory left in the heap, and I've seen the heap get much larger without causing this issue. Does this seem like a CF bug to anyone else? Is anyone else using 64 bit ColdFusion? I'm not really sure if 64 bit is the culprit, but it's really my only variable in comparison to my production servers. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315569 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFScript for loop broken? (aka HELP!!)
It was Daniel that wrote the code, not me. ;) His for loop is sound. Only difference between yours and his is the use of the new ++ operator instead of the old i = i + 1 style that is required before CF8. cheres, barneyb On Wed, Nov 19, 2008 at 10:41 AM, Mark Kruger [EMAIL PROTECTED] wrote: Barney, Unusual syntax for a for loop... Looks more like a while loop. I would have expected something like... for(awesomevariable=1; awesomevariable LT (ArrayLen(test); awesomevariable++) { } I would sort of expect your example to throw an error. I don't think that's your problem, since it seems more related to scoping if test is reporting undefined ... but it is unusual to my eye. If I were to try and do it the way your code seems to want to do it I would do: Awesomevariable = 0; While(awesomevariable LT arraylen(test)) { awesomevariable++; // whatever else you are doing... } -Mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com -Original Message- From: Barney Boisvert [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 19, 2008 12:29 PM To: cf-talk Subject: Re: CFScript for loop broken? (aka HELP!!) Is that code in a CFC that uses 'awesomevariable' and/or 'test' as a variable name within another method? If so, just var-scope everything and the problem should vanish. cheers, barneyb On Wed, Nov 19, 2008 at 9:38 AM, Daniel Jimenez [EMAIL PROTECTED] wrote: Thanks in advance for any advice anyone can give. I'm having a very odd problem where, after running for a period of time, all for loops in CFScript break. What I have is the following very, very simple sample code below: cfset test = [test1,test2] cfscript for(awesomevariable=1; awesomevariable LT (ArrayLen(test)); awesomevariable = awesomevariable+1) { writeOutput(test[awesomevariable]); } /cfscript Under normal circumstances (and using an empty application.cfc), this will print test1test2 to the browser. However after a period of time or possibly load this exact code will start throwing the error The element at position 3 of dimension 1, of array variable TEST, cannot be found. The server will continue throwing this error until I restart jBoss. I have two CF 8.0.1 Enterprise servers running on 64-bit JRockit R27.5.0 on jBoss 4.2.3. This problem eventually happens on both servers. It's driving me crazy as it takes a bit of load on the server before the problem manifests itself. Further more this only happens with a for loop inside of a cfscript, this does NOT happen inside of a cfloop! It seems the cfscript for loop can't count, as it attempts to access the 3rd position in a 2 position array. When the problem does finally crop up it eventually breaks my application (for example we use http://cflib.org/udf/CapFirstTitle on a number of pages). What's makes this even more of a mystery is that I'm running all of this EXACT same code on my current production servers which are configured the same with the exception of being 32 bit machines. These servers sit under heavy load all day with no issue. Has anyone seen anything like this before? We are using the 64 bit Coldfusion 8 (it sure would be nice if you could confirm this in CFIDE by the way). The JVM has a ton of free memory left in the heap, and I've seen the heap get much larger without causing this issue. Does this seem like a CF bug to anyone else? Is anyone else using 64 bit ColdFusion? I'm not really sure if 64 bit is the culprit, but it's really my only variable in comparison to my production servers. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315570 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFScript for loop broken? (aka HELP!!)
Is that code in a CFC that uses 'awesomevariable' and/or 'test' as a variable name within another method? If so, just var-scope everything and the problem should vanish. cheers, barneyb Nope you're seeing it raw in CFM page. The CFM we use was mentioned previously as being http://cflib.org/udf/CapFirstTitle, which is var scoped correctly. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315586 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: CFScript for loop broken? (aka HELP!!)
Further more this only happens with a for loop inside of a cfscript, this does NOT happen inside of a cfloop! A possible reason for this is that cfloop will not evaluate the ArrayLen on every iteration of the loop which is very different. While there doesn't appear to be a good reason for the error, I would presume (based on the fact that cfloop does not break) that changing the loop to the following would fix the issue for you: cfset test = [test1,test2] cfscript testLen = ArrayLen(test); for(i=1; i LT testLen; i=i+1) { } /cfscript Again, while it shouldn't make a difference in terms of the proble, the variable 'initText' is not scoped in the udf. Being strict, it should be scoped in arguments. Simply out of preference, I would not touch that variable either (ie. it is converted to lcase), and I modify the udf like so: function capFirstTitle(initText){ var Words = ListToArray( LCase( arguments.initText ), ); var nWords = ArrayLen(Words); var j = 0; // etc... for(j=1; j LTE nWords; j = j+1) { // etc... HTH Dominic ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315594 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: CFScript for loop broken? (aka HELP!!)
Further more this only happens with a for loop inside of a cfscript, this does NOT happen inside of a cfloop! A possible reason for this is that cfloop will not evaluate the ArrayLen on every iteration of the loop which is very different. While there doesn't appear to be a good reason for the error, I would presume (based on the fact that cfloop does not break) that changing the loop to the following would fix the issue for you: cfset test = [test1,test2] cfscript testLen = ArrayLen(test); for(i=1; i LT testLen; i=i+1) { } /cfscript I actually tried just that before posting to the list-- same result. :( ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315644 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: CFScript for loop broken? (aka HELP!!)
An update for those who are interested. I've switched to the 64 bit Sun Hotspot JVM and the problem seems to have cleared up. It appears there might be some JRockit / CF8x64 issues. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315645 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: CFScript for loop broken? (aka HELP!!)
@Daniel, Glad that worked for you. Out of curiosity, don't you need LTE (rather than just LT) to get your full loop? A bit OT, but seems like you'd be missing some results if you only have the LT test? cfscript test = [test1,test2]; for (awesomevariable = 1; awesomevariable LTE (ArrayLen(test)); awesomevariable = awesomevariable + 1) { writeOutput(test[awesomevariable]); } /cfscript ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315648 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfscript question
On Tue, Aug 26, 2008 at 10:45 AM, Scott Stewart [EMAIL PROTECTED]wrote: Is it possible to do a query output loop in cfscript using something other than WriteOutput? obvious question is... why? :) for (i=1; i lt queryname.recordcount; i=i+1) { // you can pretty that up a bit if you're on CF8 writeOutput(queryname.columnName[i] br /); } why won't writeOutput work for you? what are you trying to do that writeoutput isn't the solution? -- A byte walks into a bar and orders a pint. Bartender asks him What's wrong? Byte says Parity error. Bartender nods and says Yeah, I thought you looked a bit off. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311606 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfscript question
Are you wishing for your function to return the generated content as a return variable as opposed to directly outputting to the page buffer? If so, you can concatenate strings together and then return the string at the end of the function. I'm not really sure where you are going with this though. If I am writing code that is outputting HTML etc, I usually do it in tags because that is what makes the most sense. I generally reserve cfscript for logic that doesn't involve output. ~Brad - Original Message - From: Scott Stewart [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Tuesday, August 26, 2008 12:45 PM Subject: cfscript question Is it possible to do a query output loop in cfscript using something other than WriteOutput? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311608 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfscript question
trying to make sense out of some screwy logic that someone else did although I'm about ready to rewrite it with tags... Charlie Griefer wrote: On Tue, Aug 26, 2008 at 10:45 AM, Scott Stewart [EMAIL PROTECTED]wrote: Is it possible to do a query output loop in cfscript using something other than WriteOutput? obvious question is... why? :) for (i=1; i lt queryname.recordcount; i=i+1) { // you can pretty that up a bit if you're on CF8 writeOutput(queryname.columnName[i] br /); } why won't writeOutput work for you? what are you trying to do that writeoutput isn't the solution? -- Scott Stewart ColdFusion Developer Office of Research Information Systems Research amp; Economic Development University of North Carolina at Chapel Hill Phone:(919)843-2408 Fax: (919)962-3600 Email: [EMAIL PROTECTED] ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311609 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfscript question
nope, I need to populate a function call based on another query Brad Wood wrote: Are you wishing for your function to return the generated content as a return variable as opposed to directly outputting to the page buffer? If so, you can concatenate strings together and then return the string at the end of the function. I'm not really sure where you are going with this though. If I am writing code that is outputting HTML etc, I usually do it in tags because that is what makes the most sense. I generally reserve cfscript for logic that doesn't involve output. ~Brad - Original Message - From: Scott Stewart [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Tuesday, August 26, 2008 12:45 PM Subject: cfscript question Is it possible to do a query output loop in cfscript using something other than WriteOutput? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311613 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: cfscript question
Is it possible to do a query output loop in cfscript using something other than WriteOutput? The only way to write any output directly from CFSCRIPT is to use WriteOutput. You can, of course, invoke functions written in CFML from CFSCRIPT. 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;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311617 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfscript question
lemme rephrase... I'm trying to populate a function call, by looping over the record count of a query to end up with something like this: function(sunday_0, mon_0, tues_0) function(sunday_1, monday_1, tues_1) etc. the number is dynamic based on the record count of a query.. code: if(IsDefined(url.edit)){ For (i=1;i LTE get_category.Recordcount; i=i+1) category_id = get_category.id[i]; sunday = session.tmp_sunday_get_category.id[i]; monday = session.tmp_monday_get_category.id[i]; tuesday = session.tmp_tuesday_get_category.id[i]; wednesday= session.tmp_wednesday_get_category.id[i]; thursday = session.tmp_thursday_get_category.id[i]; friday = session.tmp_friday_get_category.id[i]; saturday = session.tmp_saturday_get_category.id[i]; update_time = application.studySYS.timetrex_updateStudyTime(study_id,category_id,sunday,,monday,tuesday,wednesday,thursday,friday,saturday); }else{ For (i=1;i LTE get_category.Recordcount; i=i+1) category_id = get_category.id[i]; sunday = session.tmp_sunday_get_category.id[i]; monday = session.tmp_monday_get_category.id[i]; tuesday = session.tmp_tuesday_get_category.id[i]; wednesday= session.tmp_wednesday_get_category.id[i]; thursday = session.tmp_thursday_get_category.id[i]; friday = session.tmp_friday_get_category.id[i]; saturday = session.tmp_saturday_get_category.id[i]; insert_time = application.studySYS.timetrex_insertStudyTime(study_id,category_id,sunday,,monday,tuesday,wednesday,thursday,friday,saturday); } Dave Watts wrote: Is it possible to do a query output loop in cfscript using something other than WriteOutput? The only way to write any output directly from CFSCRIPT is to use WriteOutput. You can, of course, invoke functions written in CFML from CFSCRIPT. 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;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311619 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfscript question
yea but...function calls shouldn't have dynamic number of arguments. perhaps u mean to create a list of arguments and pass it in as 1 argument? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311622 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cfscript question
yea but...function calls shouldn't have dynamic number of arguments. Why not? 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;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311623 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cfscript question
I'm trying to populate a function call, by looping over the record count of a query What you have looks fine to me. What's the problem, exactly? 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;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311624 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfscript loop versus cfloop
I'm having a hard time tracking down the source of an error I'm receiving from a recursive function. Are these loops identical? Not quite, the cfscript loop should look like this: for (i=1; i LTE qNav.recordCount; i=i+1) { . } Dominic -- Blog it up: http://fusion.dominicwatson.co.uk ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303396 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfscript loop versus cfloop
you need to declare i via the script approach. cfloop does a basic declaration for you. the for loop does not. NOTE: if this loop is within a cffunction then ensure you have scoped i correctly (place var i = 1 above the loop) or (i = 1; i LTE qNav.recordCount; i=i+1) { . } -Pat http://patweb99.avatu.com On Tue, Apr 15, 2008 at 6:08 AM, Jason Durham [EMAIL PROTECTED] wrote: I'm having a hard time tracking down the source of an error I'm receiving from a recursive function. Are these loops identical? cfloop from=1 to=#qNav.recordCount# index=I /cfloop for (; i LTE qNav.recordCount; i=i+1) { . } ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303398 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: cfscript loop versus cfloop
Thank you Dominic and Patrick for your suggestions. In both cases, i is var scoped just before the loops. The version with cfloop is the one that's giving me trouble. Perhaps it's not in the loop syntax. I've gone character by character comparing the rest of the code in each function and they appear identical. -Original Message- From: Patrick Santora [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 15, 2008 8:18 AM To: CF-Talk Subject: Re: cfscript loop versus cfloop you need to declare i via the script approach. cfloop does a basic declaration for you. the for loop does not. NOTE: if this loop is within a cffunction then ensure you have scoped i correctly (place var i = 1 above the loop) or (i = 1; i LTE qNav.recordCount; i=i+1) { . } -Pat http://patweb99.avatu.com On Tue, Apr 15, 2008 at 6:08 AM, Jason Durham [EMAIL PROTECTED] wrote: I'm having a hard time tracking down the source of an error I'm receiving from a recursive function. Are these loops identical? cfloop from=1 to=#qNav.recordCount# index=I /cfloop for (; i LTE qNav.recordCount; i=i+1) { . } ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303399 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfscript loop versus cfloop
The version with cfloop is the one that's giving me trouble. Is that an 'L' for the cfloop index or an uppercase 'i'? Other than that I'd say we'd need to see more (nothing wrong with the cfloop or scripted loop if i is set before it). Dominic -- Blog it up: http://fusion.dominicwatson.co.uk ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303401 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfscript loop versus cfloop
The syntax looks correct, what is the error you are getting? On Tue, Apr 15, 2008 at 6:22 AM, Jason Durham [EMAIL PROTECTED] wrote: Thank you Dominic and Patrick for your suggestions. In both cases, i is var scoped just before the loops. The version with cfloop is the one that's giving me trouble. Perhaps it's not in the loop syntax. I've gone character by character comparing the rest of the code in each function and they appear identical. -Original Message- From: Patrick Santora [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 15, 2008 8:18 AM To: CF-Talk Subject: Re: cfscript loop versus cfloop you need to declare i via the script approach. cfloop does a basic declaration for you. the for loop does not. NOTE: if this loop is within a cffunction then ensure you have scoped i correctly (place var i = 1 above the loop) or (i = 1; i LTE qNav.recordCount; i=i+1) { . } -Pat http://patweb99.avatu.com On Tue, Apr 15, 2008 at 6:08 AM, Jason Durham [EMAIL PROTECTED] wrote: I'm having a hard time tracking down the source of an error I'm receiving from a recursive function. Are these loops identical? cfloop from=1 to=#qNav.recordCount# index=I /cfloop for (; i LTE qNav.recordCount; i=i+1) { . } ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303402 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: cfscript loop versus cfloop
Provided that i is set to 1 before the for loop (var i = 1;), then yes, the loops are identical ..:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com http://cf4em.com -Original Message- From: Jason Durham [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 15, 2008 9:08 AM To: CF-Talk Subject: cfscript loop versus cfloop I'm having a hard time tracking down the source of an error I'm receiving from a recursive function. Are these loops identical? cfloop from=1 to=#qNav.recordCount# index=I /cfloop for (; i LTE qNav.recordCount; i=i+1) { . } ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303403 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfscript loop versus cfloop
just an observation but the index in the cfloop doesnt look like an 'i' my eyes may be playing me up though!!! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303404 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4