Re: cfscript functions in CFCs

2005-03-03 Thread Ben Doom
cfcomponent cfscript function myFunc... return resultVar /cfscript That method nets function myFunc not found. It's been a while since I've played with CFC's, but from what I remember, that should work. Are you calling object.myfunc()? That method gets me a variable myArg

RE: cfscript functions in CFCs

2005-03-03 Thread Paul
and CFMX; my life would be simpler if I could talk my way into a second MX license... -Original Message- From: Jared Rypka-Hauer - CMG, LLC [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 02, 2005 10:20 PM To: CF-Talk Subject: Re: cfscript functions in CFCs This also works: test.cfc

RE: cfscript functions in CFCs

2005-03-03 Thread Paul
Well this syntax is invalid -- if your psuedocode is accurate... You can't declare a function within a function. Or that was what I thought You're right - my function-within-a-function code block caused an error on CFMX server. It does seem like a pretty silly idea after having it pointed

Re: cfscript functions in CFCs

2005-03-03 Thread Jared Rypka-Hauer - CMG, LLC
])/ /cffunction /cfcomponent test2.cfc - cfcomponent cfscript function getCGI(cV) { var cVlocal = ''; if (len(cV)) { cVlocal = cgi[cV

RE: cfscript functions in CFCs

2005-03-03 Thread Paul
This was a fun, if simple, excercise... thanks Paul! For as often as I'm confused, it's nice that at least my questions at least occasionally lead to something positive for someone out there! Thanks for looking into it, as well.

Re: cfscript functions in CFCs

2005-03-03 Thread Adam Haskell
:20:25 -0600, Jared Rypka-Hauer - CMG, LLC [EMAIL PROTECTED] wrote: This also works: test.cfc - cfcomponent cfscript function getCGI(cV) { try { return cgi[cV

Re: cfscript functions in CFCs

2005-03-03 Thread Jared Rypka-Hauer - CMG, LLC
that perspective, you could create a var'ed structure, loop the arguments structure and write all the argument variables to the local structure, and then use structKeyExists for detecting their presence for conditional processing: cfscript function myFunction() { var myContainer = structNew

cfscript functions in CFCs

2005-03-02 Thread Paul
This must be easier than I'm making it this afternoon. All the UDFs from cflib.org are written in cfscript. Is there a way to store them in a CFC, say Util.cfc, and then call them from another CFC? When I attempt to do so CF can't find the function. I experimented and wrapped the cfscript

Re: cfscript functions in CFCs

2005-03-02 Thread S . Isaac Dealey
This must be easier than I'm making it this afternoon. All the UDFs from cflib.org are written in cfscript. Is there a way to store them in a CFC, say Util.cfc, and then call them from another CFC? When I attempt to do so CF can't find the function. I experimented and wrapped

RE: cfscript functions in CFCs

2005-03-02 Thread Paul
You'd have to either convert the argument list from the function to cfargument tags or you can inject the created function into the cfc like this: What I'm trying is similar to what you suggest: cfcomponent cfscript function myFunc... return resultVar /cfscript That method

RE: cfscript functions in CFCs

2005-03-02 Thread S . Isaac Dealey
cfcomponent cffunction name=myFunc cfargument name=myArg required=Yes cfscript function myFunc2... return resultVar /cfscript cfreturn myFunc2(arguments.myArg) /cffunction That method gets me a variable myArg is undefined message, curiously

Re: cfscript functions in CFCs

2005-03-02 Thread Jared Rypka-Hauer - CMG, LLC
This works: test.cfc --- cfcomponent cfscript function getCGI() { return cgi; } /cfscript /cfcomponent temp.cfm -- cfdump var=#createObject('component

Re: cfscript functions in CFCs

2005-03-02 Thread Jared Rypka-Hauer - CMG, LLC
This also works: test.cfc - cfcomponent cfscript function getCGI(cV) { try { return cgi[cV]; } catch (any cfScriptError

Re: cfscript functions in CFCs

2005-03-02 Thread Jared Rypka-Hauer - CMG, LLC
Hehe, apparently I'm replying to this message in stages... I've been playing with this. So... according to the cf documentation, all args specified in the function declaration are mandatory. It seems that the only way to use optional arguments in cfscript function arguments is to use a try block

CFSCRIPT java style

2004-12-30 Thread Katz, Dov B (IT)
Anyone know if there's a way to write plain old java inside CFM files? I was thinking something like this: CFSCRIPT language=java plain and simple java code /CFSCRIPT Just curious NOTICE: If received in error, please destroy

RE: CFSCRIPT java style

2004-12-30 Thread Dave Watts
Anyone know if there's a way to write plain old java inside CFM files? I was thinking something like this: CFSCRIPT language=java plain and simple java code /CFSCRIPT To the best of my knowledge, no. However, you can just write Java classes then call them from within CF. Dave Watts, CTO

Re: CFScript question - Queries

2004-12-09 Thread Bert Dawson
I think you need to escape (i.e. double up) the single quotes in any CF vars you're using in the query, then use preservesinglequotes() inside cfquery tag. cfscript mySQLstring = SELECT orders_id FROM Orders WHERE label = '#Replace(This_Label, ', '', all)#'; /cfscript cfquery name=qwe

Re: CFScript question - Queries

2004-12-09 Thread Barney Boisvert
I use preserveSingleQuotes with MySQL without any issue. You shouldn't need to do anything special: cfset sql = select * from mytable where name = 'barneyb' / cfquery ... #preserveSingleQuotes(sql)# /cfquery On Wed, 8 Dec 2004 18:08:02 -0500, C. Hatton Humphrey [EMAIL PROTECTED] wrote:

Re: CFScript question - Queries

2004-12-09 Thread Bert Dawson
If you're using CF variables in your SQL you may* need to escape any single quotes when you're creating your SQL statement in the first place: cfset user = Barney O'Boivert cfset sql = select * from mytable where name = '#Replace(user, ', '', all))#' / cfquery ... #preserveSingleQuotes(sql)#

CFScript question - Queries

2004-12-08 Thread C. Hatton Humphrey
Okay, to try and make my life easier I decided to try changing a block of code from CFSet to CFScript. However, part of what I need to do in this code is run a query based on a variable value... I'm pulling a label out of a record body and need to get the id of a record where a certian field

Re: CFScript question - Queries

2004-12-08 Thread Barney Boisvert
What database are you using? preserveSingleQuotes() has always worked for me, exactly as intended. However, before you go too far down this road, I'd recommend not using CFSCRIPT for this code, because there is a query inside. Sure, you can make a wrapper, as you tried, but doing

Re: CFScript question - Queries

2004-12-08 Thread Michael Dinowitz
Why not just double up the single quotes? Okay, to try and make my life easier I decided to try changing a block of code from CFSet to CFScript. However, part of what I need to do in this code is run a query based on a variable value... I'm pulling a label out of a record body and need

Re: CFScript question - Queries

2004-12-08 Thread C. Hatton Humphrey
Why not just double up the single quotes? Tried that - may be a NDA thing or just a MySQL thing - I got the same error when sending the query. To answer Barney's question - I'm using a MySQL database. That's what the clent has and I haven't been able to dissuade him from using it. When I sent

CFSCRIPT RESOURCES

2004-11-10 Thread Ryan Anklam
Does anybody know any good resources for writing scripts inside of the cfscript tag? I found something on macromedia's live doc's site but it wasn't very easy to follow. Specifically i'm looking for loops, handling arrays, and handling cfc's as objects. Thanks, Ryan

Re: CFSCRIPT RESOURCES

2004-11-10 Thread Barney Boisvert
, though with the CF built-in functions, rather than the JavaScript ones. cheers, barneyb On Wed, 10 Nov 2004 18:20:53 -0400, Ryan Anklam [EMAIL PROTECTED] wrote: Does anybody know any good resources for writing scripts inside of the cfscript tag? I found something on macromedia's live doc's site

Re: CFSCRIPT RESOURCES

2004-11-10 Thread Charlie Griefer
i've got a very introductory cfscript tutorial up on easycfm. a couple on arrays and structs, but those aren't in cfscript contexts. http://www.easycfm.com/tutorials/authors.cfm?Author=Charlie%20Griefer%20%28CJ%29 maybe they'll give you a little something to go on at least. On Wed, 10 Nov

Re: CFSCRIPT RESOURCES

2004-11-10 Thread Matt Robertson
http://www.houseoffusion.com/script.ppt Covers the basic constructs. One trick not covered is a query loop cfquery ... name=myQuery ... sql goes here... /cfquery cfscript LoopStep=1; do { // stuff LoopStep=LoopStep+1; } while (LoopStep LTE myQuery.RecordCount); /cfscript You can play

Re: CFSCRIPT RESOURCES

2004-11-10 Thread Barney Boisvert
Won't that loop break if you have a zero-row recordset? This one won't, and is more readable (I think), and less prone to forgetting that increment line in the middle. cfscript for (LoopStep = 1; LoopStep myQuery.recordCount; LoopStep = LoopStep + 1) { // stuff } /cfscript cheers, barneyb

RE: CFSCRIPT RESOURCES

2004-11-10 Thread Michael Dinowitz
Also http://www.houseoffusion.com/docs/cfscript.htm This covers all the loops and is only missing try/catch http://www.houseoffusion.com/script.ppt Covers the basic constructs. One trick not covered is a query loop cfquery ... name=myQuery ... sql goes here... /cfquery cfscript

Re: CFSCRIPT RESOURCES

2004-11-10 Thread Matt Robertson
I've never been a fan of for loops. Just a personal pref on my part. I deal with zero recordsets by surrounding the loop in if (myquery.recordcount gt 0) { blah }. And of course you cannot use '' as an operator, and its equivalent, LT, would exclude the last record in the set, but I get the idea

Re: CFSCRIPT RESOURCES

2004-11-10 Thread Barney Boisvert
Yeah, you're right. should be LTE, not . I make that mistake a lot, because CF is both one-indexed, and uses weird-ass operators. Why oh why couldn't it just be normal like JS, AS, Java, C, Perl, PHP, etc. etc. ;) I'd include SQL in there, but it's hardly normal, though way more normal than

Looping in CFSCRIPT

2004-09-09 Thread Andrew Dixon
Hi Everyone. Does anyone know how to loop within CFSCRIPT over a query and/or a comma list, like you can with CFLOOP? Also, does anyone konw if there is a good guide to CFSCRIPT anywhere as the MM documentation of CFSCRIPT is pretty much none existant. Thanks Andrew. [Todays Threads

Re: Looping in CFSCRIPT

2004-09-09 Thread joe velez
funny u mention that.. i was just looking today and came across this http://www.houseoffusion.com/script.ppt and http://tutorial84.easycfm.com/ you can use FOR and WHILE loops .. its in the ppt above get some caffine try to google: cfscript joe velez [Todays Threads] [This Message

Re: Looping in CFSCRIPT

2004-09-09 Thread joe velez
i havent actually played w/ cfscript too much, but in reading about it briefly i believe its something like this for a comma del. list cfscript var=0; /* not sure if var = 0 if you dont set it first, you can probably exclude this, but set it to be safe */ while(VAR lte listlen(yourlist

Re: Looping in CFSCRIPT

2004-09-09 Thread Andrew Dixon
Thanks... - Original Message - From: joe velez [EMAIL PROTECTED] Date: Thu, 09 Sep 2004 06:03:47 -0400 Subject: Re: Looping in CFSCRIPT To: CF-Talk [EMAIL PROTECTED] i havent actually played w/ cfscript too much, but in reading about it briefly i believe its something like

Re: Looping in CFSCRIPT

2004-09-09 Thread Greg Stewart
Here's my write up on using cfscript for looping over a query: http://gregs.tcias.co.uk/cold_fusion/outputting_queries_with_cfscript.php Hope this helps G On Thu, 9 Sep 2004 10:42:18 +0100, Andrew Dixon [EMAIL PROTECTED] wrote: Hi Everyone. Does anyone know how to loop within CFSCRIPT over

Re: Looping in CFSCRIPT

2004-09-09 Thread joe velez
come on G .. php??? hehe =^) -- that's for Carsten god .. you know who you are! [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Re: Looping in CFSCRIPT

2004-09-09 Thread Andrew Dixon
He has a point!!! - Original Message - From: joe velez [EMAIL PROTECTED] Date: Thu, 09 Sep 2004 06:20:23 -0400 Subject: Re: Looping in CFSCRIPT To: CF-Talk [EMAIL PROTECTED] come on G .. php??? hehe =^) -- that's for Carsten god .. you know who you

RE: Looping in CFSCRIPT

2004-09-09 Thread Pascal Peters
: Looping in CFSCRIPT Hi Everyone. Does anyone know how to loop within CFSCRIPT over a query and/or a comma list, like you can with CFLOOP? Also, does anyone konw if there is a good guide to CFSCRIPT anywhere as the MM documentation of CFSCRIPT is pretty much none existant. Thanks Andrew

Re: Looping in CFSCRIPT

2004-09-09 Thread Doug James
Here is a starting point. http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/cfscript.htm Doug Andrew Dixon wrote: Hi Everyone. Does anyone know how to loop within CFSCRIPT over a query and/or a comma list, like you can with CFLOOP? Also, does anyone konw if there is a good guide

Re: Looping in CFSCRIPT

2004-09-09 Thread Greg Stewart
xon [EMAIL PROTECTED] wrote: He has a point!!! - Original Message - From: joe velez [EMAIL PROTECTED] Date: Thu, 09 Sep 2004 06:20:23 -0400 Subject: Re: Looping in CFSCRIPT To: CF-Talk [EMAIL PROTECTED] come on G .. php??? hehe =^) -- that's for Carsten god .. you know who

FindNoCase in CFScript

2004-08-26 Thread Daniel Kessler
I wanted to use a function to determine the checked state of a checkbox, so I made a function within a CFScript area.But if I use FindNoCase in it, it no longer works.If I change out the FindNoCase with the number 1 it works fine.Is it that this is a cf function that's not allowed in cfscript

Re: FindNoCase in CFScript

2004-08-26 Thread Barney Boisvert
state of a checkbox, so I made a function within a CFScript area.But if I use FindNoCase in it, it no longer works.If I change out the FindNoCase with the number 1 it works fine.Is it that this is a cf function that's not allowed in cfscript and if so, what now? cfscript function setChecked

Re: FindNoCase in CFScript

2004-08-26 Thread daniel kessler
doh.thanks.It works fine now. You're searching for a literal the_val in the string, not the passed value of the the_val variable.Remove those quotes and you should be good to go. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Query from within a cfscript

2004-08-18 Thread Howie Hamlin
I'm trying to do a CFQuery from within a cfscript and it's not working.I'm using the latest CFMX 6.1 and I'm basing my code off of this article: http://www.macromedia.com/devnet/mx/coldfusion/extreme/cftags_cfscript.html However, when I call my function I the following error: Variable CFQUERY

RE: Query from within a cfscript

2004-08-18 Thread Tangorre, Michael
Post the code. Any ideas? [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Re: Query from within a cfscript

2004-08-18 Thread Greg Stewart
, 18 Aug 2004 10:20:36 -0400, Howie Hamlin [EMAIL PROTECTED] wrote: I'm trying to do a CFQuery from within a cfscript and it's not working.I'm using the latest CFMX 6.1 and I'm basing my code off of this article: http://www.macromedia.com/devnet/mx/coldfusion/extreme/cftags_cfscript.html

Re: Query from within a cfscript

2004-08-18 Thread Howie Hamlin
Here is the code (it's supposed to log to a table): CFSCRIPT function CSLog(CustomerID,Category,SubCategory,I0,I1,I2,I3,I4,Description){ try{ SQLString = Insert into Log (Category,SubCategory,I0,I1,I2,I3,I4,Description,When) Values (#Arguments.Category#,#Arguments.SubCategory#,'#Arguments.I0

Re: Query from within a cfscript

2004-08-18 Thread Howie Hamlin
, August 18, 2004 10:29 AM Subject: Re: Query from within a cfscript Hi, Could you post your code? In the meantime, here is how I went about it: http://gregs.tcias.co.uk/cold_fusion/outputting_queries_with_cfscript.php I based it on the same example but opted for placing the query in a CFC

RE: Query from within a cfscript

2004-08-18 Thread Adrian Lynch
Have you got a function of your own called CFQuery()? Ade -Original Message- From: Howie Hamlin [mailto:[EMAIL PROTECTED] Sent: 18 August 2004 15:31 To: CF-Talk Subject: Re: Query from within a cfscript Here is the code (it's supposed to log to a table): CFSCRIPT function CSLog

Re: Query from within a cfscript

2004-08-18 Thread Howie Hamlin
No, I'm basing my code from this article: http://www.macromedia.com/devnet/mx/coldfusion/extreme/cftags_cfscript.html The sample code in the article seems to call a CFQuery from within a CFSCRIPT block: CFSCRIPT SQLString = Select * From LoginInfo where UserID='BobZ' and Password = 'Ads10

RE: Query from within a cfscript

2004-08-18 Thread Adrian Lynch
a cfscript No, I'm basing my code from this article: http://www.macromedia.com/devnet/mx/coldfusion/extreme/cftags_cfscript.html The sample code in the article seems to call a CFQuery from within a CFSCRIPT block: CFSCRIPT SQLString = Select * From LoginInfo where UserID='BobZ' and Password = 'Ads10

Re: Query from within a cfscript

2004-08-18 Thread Greg Stewart
Hamlin [EMAIL PROTECTED] wrote: No, I'm basing my code from this article: http://www.macromedia.com/devnet/mx/coldfusion/extreme/cftags_cfscript.html The sample code in the article seems to call a CFQuery from within a CFSCRIPT block: CFSCRIPT SQLString = Select * From LoginInfo where

Re: Query from within a cfscript

2004-08-18 Thread Howie Hamlin
I'm getting: Variable CFQUERY is undefined. Thanks, Howie - Original Message - From: Adrian Lynch To: CF-Talk Sent: Wednesday, August 18, 2004 10:54 AM Subject: RE: Query from within a cfscript I didn't read the article, but it seems the dude has a cfquery function. Sorry I deleted

Re: Query from within a cfscript

2004-08-18 Thread Howie Hamlin
Well, paint me stupid. Thanks, Howie - Original Message - From: Greg Stewart To: CF-Talk Sent: Wednesday, August 18, 2004 10:53 AM Subject: Re: Query from within a cfscript True but you still need to cerate a function called cfquery, here is the code from the article: cffunction

Re: Can the following be written in cfscript?

2004-08-08 Thread S . Isaac Dealey
I have to agree with Dave... Beside requiring changes to existing code, many of the tags in CFML are implemented as regular CFML custom tags -- they're in one of the directories in your cfmx installation, although I don't remember which offhand. Which means implementing the cfsetting version=5.0

Re: Can the following be written in cfscript?

2004-08-08 Thread Dick Applebaum
I agree with all that you say. But what is the alternative? Running multiple versions of CF? if MM or NA wants to move the CF install base to their latest versions, then providing total backward compatibility will forever restrict the implementation to the mistakes and limitations of past

RE: Can the following be written in cfscript?

2004-08-08 Thread Dave Watts
I agree with all that you say. But what is the alternative? Running multiple versions of CF? if MM or NA wants to move the CF install base to their latest versions, then providing total backward compatibility will forever restrict the implementation to the mistakes and limitations of

Re: Can the following be written in cfscript?

2004-08-08 Thread Peter Farrell
I feel as if I should jump back into the conversation again.I did ask a loaded question regarding if MM is going to continue with CFscript in the future.I am sorry for opening up a can of worms. As for the things not available in cfscript (i.e. cfabort, cfinclude, cflocate, etc.), there are way

RE: Can the following be written in cfscript?

2004-08-08 Thread Joe Eugene
...However.. you cannot manipuate the the returned array. Try increasing the size of the array. Joe Eugene -Original Message- From: Dave Carabetta [mailto:[EMAIL PROTECTED] Sent: Saturday, August 07, 2004 12:56 PM To: CF-Talk Subject: Re: Can the following be written in cfscript? On Sat, 7 Aug

RE: Can the following be written in cfscript?

2004-08-07 Thread Joe Eugene
: Can the following be written in cfscript? and cfml list loop is even more efficient than array... Why is a list loop faster than an array loop? http://www.rewindlife.com/archives/56.cfm Sam -Original Message- From: S. Isaac Dealey [mailto:[EMAIL PROTECTED] Sent: Friday, August 06

RE: Can the following be written in cfscript?

2004-08-07 Thread Jim Davis
knows.In the end it may be absolutely true that Java Arrays give the most performance - in Java.But in CF it may not be true. Jim Davis _ From: Joe Eugene [mailto:[EMAIL PROTECTED] Sent: Saturday, August 07, 2004 10:59 AM To: CF-Talk Subject: RE: Can the following be written in cfscript

RE: Can the following be written in cfscript?

2004-08-07 Thread S . Isaac Dealey
and cfml list loop is even more efficient than array... WOW!... There must be something really wrong with the CFMX Implementation of Arrays. That is completely backwards to Java Implementation. Bruce Eckel's (Thinking in Java) compares the Collection Classes and i believe mentions...

RE: Can the following be written in cfscript?

2004-08-07 Thread S . Isaac Dealey
Lastly it may also be that you're right.CF Arrays aren't Java Arrays. They're counted from 1, not zero.They're passed by value not by reference (which I wish would change).I'm not sure what's under the covers to do this conversion.I assume, at least for looping, that it's such a small

RE: Can the following be written in cfscript?

2004-08-07 Thread Jim Davis
I agree completely - the argument is always that you can't change something so fundamental because you don't know how people've used it. I applaud, mostly, MM's desire to remain as backwards compatible as possible.Sometimes it's just awkward tho'.;^) Jim Davis If they changed the behavior of

Re: Can the following be written in cfscript?

2004-08-07 Thread Dave Carabetta
On Sat, 7 Aug 2004 10:59:25 -0400, Joe Eugene [EMAIL PROTECTED] wrote: and cfml list loop is even more efficient than array... WOW!... There must be something really wrong with the CFMX Implementation of Arrays. That is completely backwards to Java Implementation. Bruce Eckel's (Thinking in

RE: Can the following be written in cfscript?

2004-08-07 Thread S . Isaac Dealey
I agree completely - the argument is always that you can't change something so fundamental because you don't know how people've used it. I applaud, mostly, MM's desire to remain as backwards compatible as possible.Sometimes it's just awkward tho'.;^) Yea... I often wish they were passed

Re: Can the following be written in cfscript?

2004-08-07 Thread Dick Applebaum
. On reflection, though this is exactly the way that they added scripting with cfscript.../cfscript So, they could implement compatibility with tags the user could migrate an old app by simply adding the compatibility declaratives to Application.cfm onRequestEnd.cfm. Yea... I often wish

RE: Can the following be written in cfscript?

2004-08-07 Thread Tangorre, Michael
Good points. It would be very cool to see this in a future release; maybe NewAtlanta will offer it first, putting the pressure on MM. :-) Michael T. Tangorre One way this has been done, historically, with other products, is to support both new implementations and prior implementations with

Re: Can the following be written in cfscript?

2004-08-07 Thread Peter Farrell
Big question... I've been writing a lot in cfscript lately.Seems easier a lot of the time, especially when writing long logic blocks and it can be a lot easier to read.Is MM going to do away with cfscript or should I write more in CFML. [Todays Threads] [This Message] [Subscription] [Fast

Re: Can the following be written in cfscript?

2004-08-07 Thread Dave Carabetta
On Sat, 07 Aug 2004 17:44:54 -0400, Peter Farrell [EMAIL PROTECTED] wrote: Big question... I've been writing a lot in cfscript lately.Seems easier a lot of the time, especially when writing long logic blocks and it can be a lot easier to read.Is MM going to do away with cfscript or should I

RE: Can the following be written in cfscript?

2004-08-07 Thread Jim Davis
I'm not sure why you'd ask the question.What have you heard to make you worry? CFSCRIPT appeared in CF 4.x - it's newer than CFML and a core part of the language.They really couldn't get rid of it at all easily. That being said the other side of the coin is also true: it doesn't appear

Re: Can the following be written in cfscript?

2004-08-07 Thread Dick Applebaum
In a way, that is odd: 1) cfscript resembles is based on _javascript_ 2) so is Flash ActionScript 3) both cfml and ActionScript interface _javascript_ contained in html You would think it would benefit developers using MM products to have a common scripting language. It has always bothered me

Re: Can the following be written in cfscript?

2004-08-07 Thread S . Isaac Dealey
that they added scripting with cfscript.../cfscript Say what? cfscript has no attributes... http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-a31.htm#wp 1103056 s. isaac dealey954.927.5117 new epoch : isn't it time for a change? add features without fixtures with the onTap open

RE: Can the following be written in cfscript?

2004-08-07 Thread Dave Watts
I'm just demonstrating that often when people say this is faster than that it's not the primitive thing they're talking about their implementation of it: even in simple testing code can often be optimized. More importantly, though, most of the which is faster stuff is practically useless.

RE: Can the following be written in cfscript?

2004-08-07 Thread Dave Watts
In a way, that is odd: 1) cfscript resembles is based on _javascript_ 2) so is Flash ActionScript 3) both cfml and ActionScript interface _javascript_ contained in html You would think it would benefit developers using MM products to have a common scripting language. It has always

RE: Can the following be written in cfscript?

2004-08-07 Thread Dave Watts
I've been writing a lot in cfscript lately. Seems easier a lot of the time, especially when writing long logic blocks and it can be a lot easier to read. Is MM going to do away with cfscript or should I write more in CFML. I wouldn't worry about CFSCRIPT going away - the CF development team

Re: Can the following be written in cfscript?

2004-08-07 Thread Dick Applebaum
I only meant that they added a new feature by including it within tags -- that are, essentially, compiler directives. Dick On Aug 7, 2004, at 5:40 PM, S. Isaac Dealey wrote: On reflection, though this is exactly the way that they added scripting with cfscript.../cfscript Say what? cfscript

RE: Can the following be written in cfscript?

2004-08-07 Thread Dave Watts
with cfscript.../cfscript I don't think they're comparable at all. CFSCRIPT was simply a brand new tag. Pages without that tag would work on new versions of CF just as they would on prior versions. So, they could implement compatibility with tags the user could migrate an old app by simply adding

RE: Can the following be written in cfscript?

2004-08-07 Thread S . Isaac Dealey
That being said the other side of the coin is also true: it doesn't appear as if they're particularly anxious to add to CFSCRIPT, either.;^) Well yea, they created CFFUNCTION to be an end-run around the need to support more featurees in cfscript... I understand why they took that approach

Re: Can the following be written in cfscript?

2004-08-07 Thread S . Isaac Dealey
Well if you included cfscript in a template executed on a CF3 server, the page would produce an error, so I guess I'm still unsure how that equates to cfscript version=5.0 ... or your saying that their addition of cfscript in version 4 was exactly that sort of phenomenon... :-/ ... I'm confused

RE: Can the following be written in cfscript?

2004-08-07 Thread S . Isaac Dealey
Sooner or later, backwards compatibility inhibits progress. Macromedia will need to address the BC issue or others will Unfortunately, we all have different definitions of progress. Most of the things that people have mentioned in this thread - NULL values, strong typing, etc - are

Re: Can the following be written in cfscript?

2004-08-07 Thread Dick Applebaum
of the things that has made HTML so flexible is that i every version just ignores tags that it doesn't understand (treats them as comments) -- Brilliant! Dick On Aug 7, 2004, at 6:19 PM, S. Isaac Dealey wrote: Well if you included cfscript in a template executed on a CF3 server, the page would

RE: Can the following be written in cfscript?

2004-08-07 Thread Dave Watts
To me, backward compatibility means a new version runs prior version code just like the prior version -- not that the new version additions will run on a prior version. I meant that new version of CF could accept prior version syntax, assumptions. etc, by enclosing the target code within

Re: Can the following be written in cfscript?

2004-08-07 Thread Dick Applebaum
Aw c'mon Dave -- be reasonable, application.cfm onRequestEnd.cf, Even I can understand that. Dick On Aug 7, 2004, at 7:29 PM, Dave Watts wrote: To me, backward compatibility means a new version runs prior version code just like the prior version -- not that the new version additions

Can the following be written in cfscript?

2004-08-06 Thread Che Vilnonis
If yes, how would it look. :) cfif NOT isDefined(Form.Fieldnames) cfset Fieldnames = CCType,CCNumber,CCID,CCMonth,CCYear,CCExpire cfloop list=#Fieldnames# index=i cfset Form[i] = /cfloop /cfif Thanks Che [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User

Re: Can the following be written in cfscript?

2004-08-06 Thread Jochem van Dieten
Che Vilnonis wrote: If yes, how would it look. :) cfif NOT isDefined(Form.Fieldnames) cfset Fieldnames = CCType,CCNumber,CCID,CCMonth,CCYear,CCExpire cfloop list=#Fieldnames# index=i cfset Form[i] = /cfloop /cfif if (NOT IsDefined(Form.Fieldnames) { Fieldnames =

RE: Can the following be written in cfscript?

2004-08-06 Thread DURETTE, STEVEN J (AIT)
cfscript if(not isDefined(form.fieldnames) { fieldnames = CCType,CCNumber,CCID,CCMonth,CCYear,CCExpire; } for(i = 1; i lte listLen(fieldnames, ,); i = i + 1) { form[listGetAt(fieldnames, i)] = ; } /cfscript Steve -Original Message- From: Che Vilnonis [mailto:[EMAIL PROTECTED] Sent

RE: Can the following be written in cfscript?

2004-08-06 Thread Che Vilnonis
that's it...that darn listlen gets me every time! -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 2:52 PM To: CF-Talk Subject: Re: Can the following be written in cfscript? Che Vilnonis wrote: If yes, how would it look. :) cfif

Re: Can the following be written in cfscript?

2004-08-06 Thread Mark Drew
cfscript if(NOT isDefined(Form.Fieldnames)){ Fieldnames = CCType,CCNumber,CCID,CCMonth,CCYear,CCExpire; for(i=1; i LT ListLen(FieldNames);i = i+1){ FORM[ListGetAt[i]] = ; } } /cfscript Or words to that effect. MD On Fri, 6 Aug 2004 14:45:27 -0400, Che Vilnonis [EMAIL PROTECTED

RE: Can the following be written in cfscript?

2004-08-06 Thread Samuel R. Neff
Jochem, I expect that the cfscript version of that particular code is going to be significantly slower than the cfml version.The cfml version is taking advantage of a list loop with does a single tokenization of the list.The cfscript version tokenizes the list twice in each iteration--once

Re: Can the following be written in cfscript?

2004-08-06 Thread Jochem van Dieten
Samuel R. Neff wrote: I expect that the cfscript version of that particular code is going to be significantly slower than the cfml version.The cfml version is taking advantage of a list loop with does a single tokenization of the list.The cfscript version tokenizes the list twice in each

Re: Can the following be written in cfscript?

2004-08-06 Thread S . Isaac Dealey
If yes, how would it look. :) cfif NOT isDefined(Form.Fieldnames) cfset Fieldnames = CCType,CCNumber,CCID,CCMonth,CCYear,CCExpire cfloop list=#Fieldnames# index=i cfset Form[i] = /cfloop /cfif cfscript if (not isdefined(form.fieldnames)) { fnames = listtoarray(CCType,CCNumber

RE: Can the following be written in cfscript?

2004-08-06 Thread S . Isaac Dealey
Subject: Re: Can the following be written in cfscript? Che Vilnonis wrote: If yes, how would it look. :) cfif NOT isDefined(Form.Fieldnames) cfset Fieldnames = CCType,CCNumber,CCID,CCMonth,CCYear,CCExpire cfloop list=#Fieldnames# index=i cfset Form[i] = /cfloop /cfif if (NOT IsDefined

RE: Can the following be written in cfscript?

2004-08-06 Thread Samuel R. Neff
: Can the following be written in cfscript? The array will be more efficient. (And personally I find that the array usually involves fewer keystrokes as well.) [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Re: Can the following be written in cfscript?

2004-08-06 Thread Patricia Lee
or as an alternate for the listloop: while (listlen(form.fieldnames) GT 0){ field = ListFirst(form.fieldnames); form[field] = ; form.fieldnames = ListRest(form.fieldnames); } Che Vilnonis wrote: If yes, how would it look. :) cfif NOT isDefined(Form.Fieldnames) cfset Fieldnames =

RE: Can the following be written in cfscript?

2004-08-06 Thread Samuel R. Neff
Why tokenize the list twice per iteration when we can do it three times per iteration?:-) Sam -Original Message- From: Patricia Lee [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 4:09 PM To: CF-Talk Subject: Re: Can the following be written in cfscript

RE: Can the following be written in cfscript?

2004-08-06 Thread Patricia Lee
be written in cfscript? or as an alternate for the listloop: while (listlen(form.fieldnames) GT 0){ field = ListFirst(form.fieldnames); form[field] = ; form.fieldnames = ListRest(form.fieldnames); } [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations

RE: Can the following be written in cfscript?

2004-08-06 Thread S . Isaac Dealey
Yea, but I was only commenting on the cfscript version. and cfml list loop is even more efficient than array... Why is a list loop faster than an array loop? http://www.rewindlife.com/archives/56.cfm Sam s. isaac dealey954.927.5117 new epoch : isn't it time for a change? add features

CFSCRIPT Variable error

2004-07-22 Thread Daryl Walsh
If I assign a variable a value directly, eg cfset product_id = 101, T can then read the variable #product_id# inside cfscript tags. If I assign a variable a value via another variable, eg, cfset product_id = getProduct.product_id it generates an error in cfscript when it tries to read

<    1   2   3   4   5   6   7   8   9   10   >