cfscript question...

2003-11-06 Thread Che Vilnonis
What am I doing wrong here?

cfscript
// Intialize List
FieldList =
CustEmail,CustPassword,CustPassword2,BillFirstName,BillLastName,BillAddress
,BillAddress2,BillCity,BillState,BillZip,BillPhone;

// Loop thru list and define all FORM variables
for(i=1; i LTE listlen(FieldList); i = i + 1)
	if (NOT isDefined(FORM[listgetat(FieldList,i)]))
FORM[listgetat(FieldList,i)] = ;
/cfscript

Che Vilnonis
Application Developer
Advertising Systems Incorporated
8470C Remington Avenue
Pennsauken, NJ 08110
p: 856.488.2211
f: 856.488.1990
www.asitv.com

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: cfscript question...

2003-11-06 Thread Tony Weeg
don't you need {}'s around theFORM[listgetat(FieldList,i)] = ;

or if not, what error are you getting?

...tony

tony weeg
senior web applications architect
navtrak, inc.
www.navtrak.net
[EMAIL PROTECTED]
410.548.2337

-Original Message-
From: Che Vilnonis [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 06, 2003 4:26 PM
To: CF-Talk
Subject: cfscript question...

What am I doing wrong here?

cfscript
// Intialize List
FieldList =
CustEmail,CustPassword,CustPassword2,BillFirstName,BillLastName,BillAddress
,BillAddress2,BillCity,BillState,BillZip,BillPhone;

// Loop thru list and define all FORM variables for(i=1; i LTE
listlen(FieldList); i = i + 1)
	if (NOT isDefined(FORM[listgetat(FieldList,i)]))
FORM[listgetat(FieldList,i)] = ;
/cfscript

Che Vilnonis
Application Developer
Advertising Systems Incorporated
8470C Remington Avenue
Pennsauken, NJ 08110
p: 856.488.2211
f: 856.488.1990
www.asitv.com


 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: cfscript question...

2003-11-06 Thread Raymond Camden
I assume you want to see if form[X] is defined, were X is from
fieldList. You are missing a # sign:

if(not isDefined(form.#listGetAt(fieldlist,i)#))
form[listGetAt(fieldList,i)] = ;

Also note I switched to dot notation for the isDefined check. If you
want to use brackets, switch to structKeyExists

if(not structKeyExists(form, listGetAt(fieldlist,i))


 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: cfscript question...

2003-11-06 Thread J E VanOver
What is it not doing right?

One thing, isDefined wants a simple string.Try:
if (NOT isDefined(FORM[#listgetat(FieldList,i)#]))

Jann

-Original Message-
From: Che Vilnonis [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 06, 2003 1:26 PM
To: CF-Talk
Subject: cfscript question...

What am I doing wrong here?

cfscript
// Intialize List
FieldList =
CustEmail,CustPassword,CustPassword2,BillFirstName,BillLastName,BillAddress
,BillAddress2,BillCity,BillState,BillZip,BillPhone;

// Loop thru list and define all FORM variables
for(i=1; i LTE listlen(FieldList); i = i + 1)
if (NOT isDefined(FORM[listgetat(FieldList,i)]))
FORM[listgetat(FieldList,i)] = ;
/cfscript

Che Vilnonis
Application Developer
Advertising Systems Incorporated
8470C Remington Avenue
Pennsauken, NJ 08110
p: 856.488.2211
f: 856.488.1990
www.asitv.com


 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: cfscript question...

2003-11-06 Thread Che Vilnonis
Using CF5. The error is...

Parameter 1 of function IsDefined which is now
FORM[listgetat(FieldList,i)] must be a syntactically valid variable name.

-Original Message-
From: Tony Weeg [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 06, 2003 4:31 PM
To: CF-Talk
Subject: RE: cfscript question...

don't you need {}'s around theFORM[listgetat(FieldList,i)] = ;

or if not, what error are you getting?

...tony

tony weeg
senior web applications architect
navtrak, inc.
www.navtrak.net
[EMAIL PROTECTED]
410.548.2337

-Original Message-
From: Che Vilnonis [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 06, 2003 4:26 PM
To: CF-Talk
Subject: cfscript question...

What am I doing wrong here?

cfscript
// Intialize List
FieldList =

CustEmail,CustPassword,CustPassword2,BillFirstName,BillLastName,BillAddress
,BillAddress2,BillCity,BillState,BillZip,BillPhone;

// Loop thru list and define all FORM variables for(i=1; i LTE
listlen(FieldList); i = i + 1)
if (NOT isDefined(FORM[listgetat(FieldList,i)]))
FORM[listgetat(FieldList,i)] = ;
/cfscript

Che Vilnonis
Application Developer
Advertising Systems Incorporated
8470C Remington Avenue
Pennsauken, NJ 08110
p: 856.488.2211
f: 856.488.1990
www.asitv.com


 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: cfscript question...

2003-11-06 Thread Barney Boisvert
your isDefined() call must be passed a string containing a valid variable
name.So you probably want that line to say this:

if (NOT isDefined(form.#listGetAt(fieldlist, i)#))

barneyb
-Original Message-
From: Che Vilnonis [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 06, 2003 1:26 PM
To: CF-Talk
Subject: cfscript question...

What am I doing wrong here?

cfscript
// Intialize List
FieldList =

CustEmail,CustPassword,CustPassword2,BillFirstName,BillLastName,BillAddress
,BillAddress2,BillCity,BillState,BillZip,BillPhone;

// Loop thru list and define all FORM variables
for(i=1; i LTE listlen(FieldList); i = i + 1)
if (NOT isDefined(FORM[listgetat(FieldList,i)]))
FORM[listgetat(FieldList,i)] = ;
/cfscript

Che Vilnonis
Application Developer
Advertising Systems Incorporated
8470C Remington Avenue
Pennsauken, NJ 08110
p: 856.488.2211
f: 856.488.1990
www.asitv.com


 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: cfscript question...

2003-11-06 Thread Che Vilnonis
that was it Ray... btw, how do you know all of this stuff?
you must use more than 10% of your brain :)

-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 06, 2003 4:33 PM
To: CF-Talk
Subject: RE: cfscript question...

I assume you want to see if form[X] is defined, were X is from
fieldList. You are missing a # sign:

if(not isDefined(form.#listGetAt(fieldlist,i)#))
form[listGetAt(fieldList,i)] = ;

Also note I switched to dot notation for the isDefined check. If you
want to use brackets, switch to structKeyExists

if(not structKeyExists(form, listGetAt(fieldlist,i))


 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




cfscript

2003-10-10 Thread Gabriel Robichaud
Hey out there?

 
Anyone know of a good resource for CFScript... some documentation would be
really cool!

TIA!!

 
Gabriel

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: cfscript

2003-10-10 Thread Charlie Griefer
http://tutorial84.easycfm.com/

also, i put together a calendar in cfscript just for the hell of it...
http://charlie.griefer.com/cfscript_calendar.cfm
 
- Original Message - 
From: Gabriel Robichaud 
To: CF-Talk 
Sent: Friday, October 10, 2003 12:24 PM
Subject: cfscript

Hey out there?

Anyone know of a good resource for CFScript... some documentation would be
really cool!

TIA!!

Gabriel


 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: cfscript

2003-10-10 Thread Owens, Howard
Improving my knowledge of _javascript_ helped me a lot with CFSCRIPT.

I would learn how functions work.

Learn flow control and conditionals.

Remember you can use cf's built-in functions in cfscript.

Go to cflib.org and study a bunch of UDFs.

H.

~~
Howard Owens
Internet Operations Coordinator
Ventura County Star / E.W. Scripps Co.
www.venturacountystar.com
[EMAIL PROTECTED]
AIM: GoCatGo1956
~~

 -Original Message-
 From:	Gabriel Robichaud [SMTP:[EMAIL PROTECTED]
 Sent:	Friday, October 10, 2003 12:24 PM
 To:	CF-Talk
 Subject:	cfscript
 
 Hey out there?
 
 
 Anyone know of a good resource for CFScript... some documentation would be
 really cool!
 
 TIA!!
 
 
 Gabriel
 
_
 
 
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re:Dynamic queryname in CFSCRIPT

2003-10-06 Thread Rory Lysaght
Matthew,
Thank you - that did the trick.I assumed a string, the name of the query, was what I needed, but it works perfectly without the quotes.
function timeRes(x) {
myarray = arrayNew(1);
myarray[1] = rsEquipAvail0;
rCount = myarray[x].RecordCount;
// etc.
}

Oh here's the problem:

You are placing strings in your array -- rsEquipAvail1 is a string. Try it
without the quotes. 

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re:Dynamic queryname in CFSCRIPT

2003-10-06 Thread Rory Lysaght
That fixed it - thanks.

Oh here's the problem:

You are placing strings in your array -- rsEquipAvail1 is a string. Try it
without the quotes. 

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Dynamic queryname in CFSCRIPT

2003-10-05 Thread Rory Lysaght
I've got a function that needs to check a different query depending on how it's called.But I keep getting this error:
You have attempted to dereference a scalar variable of type class
java.lang.String as a structure with members. 
The function is evaluating the string properly, but the line myarray[x].RecordCount; chokes.

Here's a simplified version of the script:

cfscript
function timeRes(x) {
myarray = arrayNew(1);
myarray[1] = rsEquipAvail1;
myarray[2] = rsEquipAvail2; //, rsEquipAvail2, rsEquipAvail3);
rCount = myarray[x].RecordCount;
return rCount;
}
/cfscript
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Dynamic queryname in CFSCRIPT

2003-10-05 Thread Matthew Walker
What happens if you write:

myQuery =myarray[x];

rCount = myQuery.recordCount 

instead of 

rCount = myarray[x].RecordCount;

?

-Original Message-
From: Rory Lysaght [mailto:[EMAIL PROTECTED] 
Sent: Monday, 6 October 2003 10:45 a.m.
To: CF-Talk
Subject: Dynamic queryname in CFSCRIPT

I've got a function that needs to check a different query depending on how
it's called.But I keep getting this error:
You have attempted to dereference a scalar variable of type class
java.lang.String as a structure with members. 
The function is evaluating the string properly, but the line
myarray[x].RecordCount; chokes.

Here's a simplified version of the script:

cfscript
function timeRes(x) {
myarray = arrayNew(1);
myarray[1] = rsEquipAvail1;
myarray[2] = rsEquipAvail2; //, rsEquipAvail2, rsEquipAvail3);
rCount = myarray[x].RecordCount;
return rCount;
}
/cfscript

_


 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re:Dynamic queryname in CFSCRIPT

2003-10-05 Thread Rory Lysaght
What happens if you write:

myQuery =myarray[x];

rCount = myQuery.recordCount 

instead of 

rCount = myarray[x].RecordCount;


Good suggestion, but it generates the same error message on the 
rCount = myQuery.recordCount; 
line.
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Dynamic queryname in CFSCRIPT

2003-10-05 Thread Matthew Walker
Oh here's the problem:

You are placing strings in your array -- rsEquipAvail1 is a string. Try it
without the quotes. 

-Original Message-
From: Rory Lysaght [mailto:[EMAIL PROTECTED] 
Sent: Monday, 6 October 2003 10:45 a.m.
To: CF-Talk
Subject: Dynamic queryname in CFSCRIPT

I've got a function that needs to check a different query depending on how
it's called.But I keep getting this error:
You have attempted to dereference a scalar variable of type class
java.lang.String as a structure with members. 
The function is evaluating the string properly, but the line
myarray[x].RecordCount; chokes.

Here's a simplified version of the script:

cfscript
function timeRes(x) {
myarray = arrayNew(1);
myarray[1] = rsEquipAvail1;
myarray[2] = rsEquipAvail2; //, rsEquipAvail2, rsEquipAvail3);
rCount = myarray[x].RecordCount;
return rCount;
}
/cfscript

_


 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: Dynamic queryname in CFSCRIPT

2003-10-05 Thread Claude Schneegans
I suppose rsEquipAvail1 and rsEquipAvail2 are queries?
Then try this

rCount = evaluate(myarray[x]  .RecordCount);

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Can I Throw within cfscript???

2003-09-17 Thread Adam Wayne Lehman
Right. This is one of the fundamental reasons you can't use cfscript
that much. If you wrap Cfthrow in another function (or use the one
Raymond wrote) the error is actually throw from the throw function, not
where you called the function. So the error will always show the lines
of the throw function, not actually throw was called, like it should. Is
there anyway to change this?

Why oh why do we have try/catch but no throw? It's like we got loops
without a break command.

Adam Wayne Lehman
Web Systems Developer
Johns Hopkins Bloomberg School of Public Health
Distance Education Division


-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 16, 2003 10:18 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

You _have_ to use cfthrow within test to throw within test.

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 16, 2003 10:03 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Bryan,
This is not the same code.  All you are doing is returning from a
function
call.  You are NOT throwing an exception within test.

Andy


-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 9:03 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


Here is the answer

cftry
!--- This line throws error ---
cfset test1()
cfcatch type=any
cfoutput#test(message=CFCatch Exists -
#IsDefined(cfcatch)#)#/cfoutput
/cfcatch
/cftry
br
cfscript
try {
test1();
}
catch(Any excpt) {
writeoutput(test(message=CFCatch Exists -
#IsDefined(excpt)#));
}
/cfscript

cffunction name=Test
cfargument name=message
cfset myMessage=Arguments.message
cfreturn myMessage
/cffunction

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 9:34 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Bryan,

Here is sample code.  First, observe that the two catch blocks behave
differently.  Second, can you replace the throw in Test with a script
statement without changing the other code?

cftry
cfset test()
cfcatch type=any
cfoutputCFCatch Exists -
#IsDefined(cfcatch)#/cfoutput
/cfcatch
/cftry

cfscript
try {
test();
}
catch(Any excpt) {
writeoutput(brCFCatch Exists -
#IsDefined(cfcatch)#);
}
/cfscript

cffunction name=Test
cfthrow message=This is a throw error
/cffunction

Andy
-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 8:18 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


Ok, I need some more information. Please post an example of your cfc and
your cfml page

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 9:00 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Not what I am looking to do.  I wish for the method to stop processing
when
I throw the exception and for control to return to the Try/Catch blocks.







~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com


RE: Can I Throw within cfscript???

2003-09-17 Thread Bryan F. Hogan
Adam, you can still do a try/catch inside the throw function. By using
writeoutput(excp.message);

-Original Message-
From: Adam Wayne Lehman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 9:05 AM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


Right. This is one of the fundamental reasons you can't use cfscript
that much. If you wrap Cfthrow in another function (or use the one
Raymond wrote) the error is actually throw from the throw function, not
where you called the function. So the error will always show the lines
of the throw function, not actually throw was called, like it should. Is
there anyway to change this?

Why oh why do we have try/catch but no throw? It's like we got loops
without a break command.

Adam Wayne Lehman
Web Systems Developer
Johns Hopkins Bloomberg School of Public Health
Distance Education Division


-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 10:18 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

You _have_ to use cfthrow within test to throw within test.

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 10:03 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Bryan,
This is not the same code.  All you are doing is returning from a
function
call.  You are NOT throwing an exception within test.

Andy


-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 9:03 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


Here is the answer

cftry
!--- This line throws error ---
cfset test1()
cfcatch type=any
cfoutput#test(message=CFCatch Exists -
#IsDefined(cfcatch)#)#/cfoutput
/cfcatch
/cftry
br
cfscript
try {
test1();
}
catch(Any excpt) {
writeoutput(test(message=CFCatch Exists -
#IsDefined(excpt)#));
}
/cfscript

cffunction name=Test
cfargument name=message
cfset myMessage=Arguments.message
cfreturn myMessage
/cffunction

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 9:34 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Bryan,

Here is sample code.  First, observe that the two catch blocks behave
differently.  Second, can you replace the throw in Test with a script
statement without changing the other code?

cftry
cfset test()
cfcatch type=any
cfoutputCFCatch Exists -
#IsDefined(cfcatch)#/cfoutput
/cfcatch
/cftry

cfscript
try {
test();
}
catch(Any excpt) {
writeoutput(brCFCatch Exists -
#IsDefined(cfcatch)#);
}
/cfscript

cffunction name=Test
cfthrow message=This is a throw error
/cffunction

Andy
-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 8:18 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


Ok, I need some more information. Please post an example of your cfc and
your cfml page

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 9:00 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Not what I am looking to do.  I wish for the method to stop processing
when
I throw the exception and for control to return to the Try/Catch blocks.








~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm


Re: Can I Throw within cfscript???

2003-09-17 Thread Thomas Chiverton
On Wednesday 17 Sep 2003 14:04 pm, Adam Wayne Lehman wrote:
 Why oh why do we have try/catch but no throw? It's like we got loops
 without a break command.

No point.
You can just an an extra looping condition, and change the value of that flag 
if you need to break out.

-- 
Tom Chiverton (sorry 'bout sig.)
Advanced ColdFusion Programmer

Tel: +44(0)1749 834997
email: [EMAIL PROTECTED]
BlueFinger Limited
Underwood Business Park
Wookey Hole Road, WELLS. BA5 1AF
Tel: +44 (0)1749 834900
Fax: +44 (0)1749 834901
web: www.bluefinger.com
Company Reg No: 4209395 Registered Office: 2 Temple Back East, Temple
Quay, BRISTOL. BS1 6EG.
*** This E-mail contains confidential information for the addressee
only. If you are not the intended recipient, please notify us
immediately. You should not use, disclose, distribute or copy this
communication if received in error. No binding contract will result from
this e-mail until such time as a written document is signed on behalf of
the company. BlueFinger Limited cannot accept responsibility for the
completeness or accuracy of this message as it has been transmitted over
public networks.***

~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com


RE: Can I Throw within cfscript???

2003-09-17 Thread Adam Wayne Lehman
Thanks Tom. There is actually a 'break' command in cfscript, I was just
using it as an example to illustrate operators and commands that go hand
in hand.

Adam Wayne Lehman
Web Systems Developer
Johns Hopkins Bloomberg School of Public Health
Distance Education Division


-Original Message-
From: Thomas Chiverton [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 17, 2003 11:03 AM
To: CF-Talk
Subject: Re: Can I Throw within cfscript???

On Wednesday 17 Sep 2003 14:04 pm, Adam Wayne Lehman wrote:
 Why oh why do we have try/catch but no throw? It's like we got loops
 without a break command.

No point.
You can just an an extra looping condition, and change the value of that
flag 
if you need to break out.

-- 
Tom Chiverton (sorry 'bout sig.)
Advanced ColdFusion Programmer

Tel: +44(0)1749 834997
email: [EMAIL PROTECTED]
BlueFinger Limited
Underwood Business Park
Wookey Hole Road, WELLS. BA5 1AF
Tel: +44 (0)1749 834900
Fax: +44 (0)1749 834901
web: www.bluefinger.com
Company Reg No: 4209395 Registered Office: 2 Temple Back East, Temple
Quay, BRISTOL. BS1 6EG.
*** This E-mail contains confidential information for the addressee
only. If you are not the intended recipient, please notify us
immediately. You should not use, disclose, distribute or copy this
communication if received in error. No binding contract will result from
this e-mail until such time as a written document is signed on behalf of
the company. BlueFinger Limited cannot accept responsibility for the
completeness or accuracy of this message as it has been transmitted over
public networks.***

~|BR
[A HREF=http://www.houseoffusion.com/lists.cfm?link=t:4;Todays Threads/A] [A 
HREF=http://www.houseoffusion.com/lists.cfm?link=t:4;This Message/A] [A 
HREF=http://www.houseoffusion.com/lists.cfm?link=s:4;Subscription/A] [A 
HREF=http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=1.1.4;Fast 
Unsubscribe/A] [A HREF=http://www.houseoffusion.com/signin/;User Settings/AP
A HREF=http://www.fusionauthority.com/banners/view.cfm?bannerid=33;  
TARGET=_blankIMG  align=center 
SRC=http://www.fusionauthority.com/banners/CF_intro_468x60.gif; WIDTH=468 
HEIGHT=60 ALT= BORDER=0/A


RE: Can I Throw within cfscript???

2003-09-17 Thread Barney Boisvert
You mean loops without a continue command, right?  There is a break in both
CFML and CFSCRIPT, but continue only in CFSCRIPT.  Quite annoying.

 -Original Message-
 From: Adam Wayne Lehman [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, September 17, 2003 6:05 AM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???


 Right. This is one of the fundamental reasons you can't use cfscript
 that much. If you wrap Cfthrow in another function (or use the one
 Raymond wrote) the error is actually throw from the throw function, not
 where you called the function. So the error will always show the lines
 of the throw function, not actually throw was called, like it should. Is
 there anyway to change this?

 Why oh why do we have try/catch but no throw? It's like we got loops
 without a break command.

 Adam Wayne Lehman
 Web Systems Developer
 Johns Hopkins Bloomberg School of Public Health
 Distance Education Division


 -Original Message-
 From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 10:18 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???

 You _have_ to use cfthrow within test to throw within test.

 -Original Message-
 From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 10:03 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???

 Bryan,
 This is not the same code.  All you are doing is returning from a
 function
 call.  You are NOT throwing an exception within test.

 Andy


 -Original Message-
 From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 9:03 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???


 Here is the answer

 cftry
   !--- This line throws error ---
   cfset test1()
   cfcatch type=any
   cfoutput#test(message=CFCatch Exists -
 #IsDefined(cfcatch)#)#/cfoutput
   /cfcatch
 /cftry
 br
 cfscript
   try {
   test1();
   }
   catch(Any excpt) {
   writeoutput(test(message=CFCatch Exists -
 #IsDefined(excpt)#));
   }
 /cfscript

 cffunction name=Test
   cfargument name=message
   cfset myMessage=Arguments.message
   cfreturn myMessage
 /cffunction

 -Original Message-
 From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 9:34 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???

 Bryan,

 Here is sample code.  First, observe that the two catch blocks behave
 differently.  Second, can you replace the throw in Test with a script
 statement without changing the other code?

 cftry
   cfset test()
   cfcatch type=any
   cfoutputCFCatch Exists -
 #IsDefined(cfcatch)#/cfoutput
   /cfcatch
 /cftry

 cfscript
   try {
   test();
   }
   catch(Any excpt) {
   writeoutput(brCFCatch Exists -
 #IsDefined(cfcatch)#);
   }
 /cfscript

 cffunction name=Test
   cfthrow message=This is a throw error
 /cffunction

 Andy
 -Original Message-
 From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 8:18 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???


 Ok, I need some more information. Please post an example of your cfc and
 your cfml page

 -Original Message-
 From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 9:00 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???

 Not what I am looking to do.  I wish for the method to stop processing
 when
 I throw the exception and for control to return to the Try/Catch blocks.







 
~|
Message: http://www.houseoffusion.com/lists.cfm?link=i:4:137327
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm


Re: Can I Throw within cfscript???

2003-09-17 Thread Sean A Corfield
On Wednesday, Sep 17, 2003, at 08:20 US/Pacific, Adam Wayne Lehman 
wrote:
 Thanks Tom. There is actually a 'break' command in cfscript, I was just
 using it as an example to illustrate operators and commands that go 
 hand
 in hand.

There are a lot of folks who think that using 'break' in a loop is 
unstructured and bad practice... i.e., they should not go 'hand in 
hand'...

Sean A Corfield -- http://www.corfield.org/blog/

If you're not annoying somebody, you're not really alive.
-- Margaret Atwood

~|
Message: http://www.houseoffusion.com/lists.cfm?link=i:4:137334
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com


Re:Can I Throw within cfscript???

2003-09-17 Thread Stan Winchester
Andy,

I'm not sure this is what you are looking for, but I've done some pretty robust error 
trapping using this type of logic:

cftry
cfscript
  message = ;
  errors = 0;
  if ( NOT IsDefined('foo') ) {
message = You must define foo;
errors = 1; 
  }
/cfscript

cfif errors EQ 1 
  cfthrow message=#message# type=goBack
/cfif

  cfcatch type=goBack
cfinclude template=[path]/errGoBack.cfm
  /cfcatch
  cfcatch type=Any
cfinclude template=[path]/errAny.cfm
  /cfcatch
/cftry

Bryan,
This is not the same code.  All you are doing is returning from a function
call.  You are NOT throwing an exception within test.

Andy

~|
Message: http://www.houseoffusion.com/lists.cfm?link=i:4:137338
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com


Can I Throw within cfscript???

2003-09-16 Thread Andy Ousterhout
Do I have to go out of the script language to throw and error or is there a
way to do it within cf-script(without separate function call that throws
error)?

Andy


~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com


RE: Can I Throw within cfscript???

2003-09-16 Thread Shawn Grover
You can write a wrapper function for CFTHROW then call that function from
within your CFScript block...

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 2:43 PM
To: CF-Talk
Subject: Can I Throw within cfscript???


Do I have to go out of the script language to throw and error or is there a
way to do it within cf-script(without separate function call that throws
error)?

Andy



~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm


Re: Can I Throw within cfscript???

2003-09-16 Thread Paul Hastings
 You can write a wrapper function for CFTHROW then call that function from
 within your CFScript block...

yes, but you have to manage most of the error details yourself. cfscript
really needs a throw().


~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm


RE: Can I Throw within cfscript???

2003-09-16 Thread Douglas.Knudsen
no need for wrapper...throw();

http://www.mail-archive.com/[EMAIL PROTECTED]/msg145231.html  for an example

doug

-Original Message-
From: Shawn Grover [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 4:48 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


You can write a wrapper function for CFTHROW then call that 
function from
within your CFScript block...

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 2:43 PM
To: CF-Talk
Subject: Can I Throw within cfscript???


Do I have to go out of the script language to throw and error 
or is there a
way to do it within cf-script(without separate function call 
that throws
error)?

Andy




~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com


RE: Can I Throw within cfscript???

2003-09-16 Thread Andy Ousterhout
This won't work on my system running under NT  MX.

Andy

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 3:53 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


no need for wrapper...throw();

http://www.mail-archive.com/[EMAIL PROTECTED]/msg145231.html  for an
example

doug

-Original Message-
From: Shawn Grover [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 4:48 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


You can write a wrapper function for CFTHROW then call that
function from
within your CFScript block...

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 2:43 PM
To: CF-Talk
Subject: Can I Throw within cfscript???


Do I have to go out of the script language to throw and error
or is there a
way to do it within cf-script(without separate function call
that throws
error)?

Andy





~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com


RE: Can I Throw within cfscript???

2003-09-16 Thread Raymond Camden
Why not? Every OS running CFMX will support cffunction.


===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)

Email: [EMAIL PROTECTED]
Blog : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

My ally is the Force, and a powerful ally it is. - Yoda 

 -Original Message-
 From: Andy Ousterhout [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, September 16, 2003 3:40 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???
 
 
 This won't work on my system running under NT  MX.
 
 Andy
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 3:53 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???
 
 
 no need for wrapper...throw();
 
http://www.mail-archive.com/[EMAIL PROTECTED]/msg145231.html
for an example



~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com


RE: Can I Throw within cfscript???

2003-09-16 Thread Andy Ousterhout
Raymond,

CFFunction works, what doesn't is:

cfscript
throw(type=ValidationError Message=This just wont work);
...

Andy

-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 4:50 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


Why not? Every OS running CFMX will support cffunction.


===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)

Email: [EMAIL PROTECTED]
Blog : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

My ally is the Force, and a powerful ally it is. - Yoda

 -Original Message-
 From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 3:40 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???


 This won't work on my system running under NT  MX.

 Andy

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 3:53 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???


 no need for wrapper...throw();

http://www.mail-archive.com/[EMAIL PROTECTED]/msg145231.html
for an example




~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com


RE: Can I Throw within cfscript???

2003-09-16 Thread Raymond Camden
foo(x=y z=a) is not valid in cfml. The example in the link below does
not do that. You should instead do:

foo(y,a)

or

foo(x=y,z=a)




===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)

Email: [EMAIL PROTECTED]
Blog : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

My ally is the Force, and a powerful ally it is. - Yoda 

 -Original Message-
 From: Andy Ousterhout [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, September 16, 2003 4:03 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???
 
 
 Raymond,
 
 CFFunction works, what doesn't is:
 
 cfscript
   throw(type=ValidationError Message=This just wont work);
   ...
 
 Andy
 
 -Original Message-
 From: Raymond Camden [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 4:50 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???
 
 
 Why not? Every OS running CFMX will support cffunction.
 
 ==
 ==
 ===
 Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
 (www.mindseye.com)
 Member of Team Macromedia 
 (http://www.macromedia.com/go/teammacromedia)
 
 Email: 
 [EMAIL PROTECTED]
 Blog : www.camdenfamily.com/morpheus/blog
 Yahoo IM : morpheus
 
 My ally is the Force, and a powerful ally it is. - Yoda
 
  -Original Message-
  From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 16, 2003 3:40 PM
  To: CF-Talk
  Subject: RE: Can I Throw within cfscript???
 
 
  This won't work on my system running under NT  MX.
 
  Andy
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 16, 2003 3:53 PM
  To: CF-Talk
  Subject: RE: Can I Throw within cfscript???
 
 
  no need for wrapper...throw();
 
 http://www.mail-archive.com/[EMAIL PROTECTED]/msg145231.html
 for an example
 
 
 
 
 
~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm


RE: Can I Throw within cfscript???

2003-09-16 Thread Andy Ousterhout
Create a complete page with only the following:

cfscript
   throw(message=Test one);
/cfscript

When you execute it, Variable THROW is undefined is thrown.

Andy


-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 5:13 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


foo(x=y z=a) is not valid in cfml. The example in the link below does
not do that. You should instead do:

foo(y,a)

or

foo(x=y,z=a)




===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)

Email: [EMAIL PROTECTED]
Blog : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

My ally is the Force, and a powerful ally it is. - Yoda

 -Original Message-
 From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 4:03 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???


 Raymond,

 CFFunction works, what doesn't is:

 cfscript
   throw(type=ValidationError Message=This just wont work);
   ...

 Andy

 -Original Message-
 From: Raymond Camden [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 4:50 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???


 Why not? Every OS running CFMX will support cffunction.

 ==
 ==
 ===
 Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
 (www.mindseye.com)
 Member of Team Macromedia
 (http://www.macromedia.com/go/teammacromedia)

 Email:
 [EMAIL PROTECTED]
 Blog : www.camdenfamily.com/morpheus/blog
 Yahoo IM : morpheus

 My ally is the Force, and a powerful ally it is. - Yoda

  -Original Message-
  From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 16, 2003 3:40 PM
  To: CF-Talk
  Subject: RE: Can I Throw within cfscript???
 
 
  This won't work on my system running under NT  MX.
 
  Andy
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 16, 2003 3:53 PM
  To: CF-Talk
  Subject: RE: Can I Throw within cfscript???
 
 
  no need for wrapper...throw();
 
 http://www.mail-archive.com/[EMAIL PROTECTED]/msg145231.html
 for an example






~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm


RE: Can I Throw within cfscript???

2003-09-16 Thread Bryan F. Hogan
Andy you still have to init your library.

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 16, 2003 7:29 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Create a complete page with only the following:

cfscript
   throw(message=Test one);
/cfscript

When you execute it, Variable THROW is undefined is thrown.

Andy


-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 5:13 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


foo(x=y z=a) is not valid in cfml. The example in the link below does
not do that. You should instead do:

foo(y,a)

or

foo(x=y,z=a)




===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)

Email: [EMAIL PROTECTED]
Blog : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

My ally is the Force, and a powerful ally it is. - Yoda

 -Original Message-
 From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 4:03 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???


 Raymond,

 CFFunction works, what doesn't is:

 cfscript
   throw(type=ValidationError Message=This just wont work);
   ...

 Andy

 -Original Message-
 From: Raymond Camden [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 4:50 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???


 Why not? Every OS running CFMX will support cffunction.

 ==
 ==
 ===
 Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
 (www.mindseye.com)
 Member of Team Macromedia
 (http://www.macromedia.com/go/teammacromedia)

 Email:
 [EMAIL PROTECTED]
 Blog : www.camdenfamily.com/morpheus/blog
 Yahoo IM : morpheus

 My ally is the Force, and a powerful ally it is. - Yoda

  -Original Message-
  From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 16, 2003 3:40 PM
  To: CF-Talk
  Subject: RE: Can I Throw within cfscript???
 
 
  This won't work on my system running under NT  MX.
 
  Andy
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 16, 2003 3:53 PM
  To: CF-Talk
  Subject: RE: Can I Throw within cfscript???
 
 
  no need for wrapper...throw();
 
 http://www.mail-archive.com/[EMAIL PROTECTED]/msg145231.html
 for an example







~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm


RE: Can I Throw within cfscript???

2003-09-16 Thread Andy Ousterhout
Huh?

-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 6:45 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


Andy you still have to init your library.

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 7:29 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Create a complete page with only the following:

cfscript
   throw(message=Test one);
/cfscript

When you execute it, Variable THROW is undefined is thrown.

Andy


-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 5:13 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


foo(x=y z=a) is not valid in cfml. The example in the link below does
not do that. You should instead do:

foo(y,a)

or

foo(x=y,z=a)




===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)

Email: [EMAIL PROTECTED]
Blog : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

My ally is the Force, and a powerful ally it is. - Yoda

 -Original Message-
 From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 4:03 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???


 Raymond,

 CFFunction works, what doesn't is:

 cfscript
   throw(type=ValidationError Message=This just wont work);
   ...

 Andy

 -Original Message-
 From: Raymond Camden [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 4:50 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???


 Why not? Every OS running CFMX will support cffunction.

 ==
 ==
 ===
 Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
 (www.mindseye.com)
 Member of Team Macromedia
 (http://www.macromedia.com/go/teammacromedia)

 Email:
 [EMAIL PROTECTED]
 Blog : www.camdenfamily.com/morpheus/blog
 Yahoo IM : morpheus

 My ally is the Force, and a powerful ally it is. - Yoda

  -Original Message-
  From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 16, 2003 3:40 PM
  To: CF-Talk
  Subject: RE: Can I Throw within cfscript???
 
 
  This won't work on my system running under NT  MX.
 
  Andy
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 16, 2003 3:53 PM
  To: CF-Talk
  Subject: RE: Can I Throw within cfscript???
 
 
  no need for wrapper...throw();
 
 http://www.mail-archive.com/[EMAIL PROTECTED]/msg145231.html
 for an example








~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com


RE: Can I Throw within cfscript???

2003-09-16 Thread Bryan F. Hogan
You have to create a reference to the cfc before you can call a function
from the cfc in your cfml.

Example:

Test.cfm
cfscript
myCFC=CreateObject('component','mycfcfilename');
myCFC.throw(message=I've been thrown to the wall, ouch!);
/cfscript

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 16, 2003 7:46 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Huh?

-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 6:45 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


Andy you still have to init your library.

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 7:29 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Create a complete page with only the following:

cfscript
   throw(message=Test one);
/cfscript

When you execute it, Variable THROW is undefined is thrown.

Andy


-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 5:13 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


foo(x=y z=a) is not valid in cfml. The example in the link below does
not do that. You should instead do:

foo(y,a)

or

foo(x=y,z=a)




===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)

Email: [EMAIL PROTECTED]
Blog : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

My ally is the Force, and a powerful ally it is. - Yoda

 -Original Message-
 From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 4:03 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???


 Raymond,

 CFFunction works, what doesn't is:

 cfscript
   throw(type=ValidationError Message=This just wont work);
   ...

 Andy

 -Original Message-
 From: Raymond Camden [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 4:50 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???


 Why not? Every OS running CFMX will support cffunction.

 ==
 ==
 ===
 Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
 (www.mindseye.com)
 Member of Team Macromedia
 (http://www.macromedia.com/go/teammacromedia)

 Email:
 [EMAIL PROTECTED]
 Blog : www.camdenfamily.com/morpheus/blog
 Yahoo IM : morpheus

 My ally is the Force, and a powerful ally it is. - Yoda

  -Original Message-
  From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 16, 2003 3:40 PM
  To: CF-Talk
  Subject: RE: Can I Throw within cfscript???
 
 
  This won't work on my system running under NT  MX.
 
  Andy
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 16, 2003 3:53 PM
  To: CF-Talk
  Subject: RE: Can I Throw within cfscript???
 
 
  no need for wrapper...throw();
 
 http://www.mail-archive.com/[EMAIL PROTECTED]/msg145231.html
 for an example









~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com


RE: Can I Throw within cfscript???

2003-09-16 Thread Andy Ousterhout
OK, now I am totally confused.  Please walk me through this...

I  have a CFC called FOO with a single method called Throw Exception:

FOO:
Function ThrowException
   throw(message=Test one);


what object am I instantiating within foo?

If I don't use scripting, the equivilent CFTHROW works perfectly.

Andy

-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 7:01 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


You have to create a reference to the cfc before you can call a function
from the cfc in your cfml.

Example:

Test.cfm
cfscript
myCFC=CreateObject('component','mycfcfilename');
myCFC.throw(message=I've been thrown to the wall, ouch!);
/cfscript

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 7:46 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Huh?

-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 6:45 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


Andy you still have to init your library.

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 7:29 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Create a complete page with only the following:

cfscript
   throw(message=Test one);
/cfscript

When you execute it, Variable THROW is undefined is thrown.

Andy


-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 5:13 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


foo(x=y z=a) is not valid in cfml. The example in the link below does
not do that. You should instead do:

foo(y,a)

or

foo(x=y,z=a)




===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)

Email: [EMAIL PROTECTED]
Blog : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

My ally is the Force, and a powerful ally it is. - Yoda

 -Original Message-
 From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 4:03 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???


 Raymond,

 CFFunction works, what doesn't is:

 cfscript
   throw(type=ValidationError Message=This just wont work);
   ...

 Andy

 -Original Message-
 From: Raymond Camden [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 4:50 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???


 Why not? Every OS running CFMX will support cffunction.

 ==
 ==
 ===
 Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
 (www.mindseye.com)
 Member of Team Macromedia
 (http://www.macromedia.com/go/teammacromedia)

 Email:
 [EMAIL PROTECTED]
 Blog : www.camdenfamily.com/morpheus/blog
 Yahoo IM : morpheus

 My ally is the Force, and a powerful ally it is. - Yoda

  -Original Message-
  From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 16, 2003 3:40 PM
  To: CF-Talk
  Subject: RE: Can I Throw within cfscript???
 
 
  This won't work on my system running under NT  MX.
 
  Andy
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 16, 2003 3:53 PM
  To: CF-Talk
  Subject: RE: Can I Throw within cfscript???
 
 
  no need for wrapper...throw();
 
 http://www.mail-archive.com/[EMAIL PROTECTED]/msg145231.html
 for an example










~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com


RE: Can I Throw within cfscript???

2003-09-16 Thread Bryan F. Hogan
First do you have a cfc file that has your function throw() in it? And
now your trying to call that function from a cfml page correct? So you
have a total of two pages, a cfc and a cfm page?

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 16, 2003 7:58 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

OK, now I am totally confused.  Please walk me through this...

I  have a CFC called FOO with a single method called Throw Exception:

FOO:
Function ThrowException
   throw(message=Test one);


what object am I instantiating within foo?

If I don't use scripting, the equivilent CFTHROW works perfectly.

Andy

-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 7:01 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


You have to create a reference to the cfc before you can call a function
from the cfc in your cfml.

Example:

Test.cfm
cfscript
myCFC=CreateObject('component','mycfcfilename');
myCFC.throw(message=I've been thrown to the wall, ouch!);
/cfscript

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 7:46 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Huh?

-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 6:45 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


Andy you still have to init your library.

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 7:29 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Create a complete page with only the following:

cfscript
   throw(message=Test one);
/cfscript

When you execute it, Variable THROW is undefined is thrown.

Andy


-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 5:13 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


foo(x=y z=a) is not valid in cfml. The example in the link below does
not do that. You should instead do:

foo(y,a)

or

foo(x=y,z=a)




===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)

Email: [EMAIL PROTECTED]
Blog : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

My ally is the Force, and a powerful ally it is. - Yoda

 -Original Message-
 From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 4:03 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???


 Raymond,

 CFFunction works, what doesn't is:

 cfscript
   throw(type=ValidationError Message=This just wont work);
   ...

 Andy

 -Original Message-
 From: Raymond Camden [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 4:50 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???


 Why not? Every OS running CFMX will support cffunction.

 ==
 ==
 ===
 Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
 (www.mindseye.com)
 Member of Team Macromedia
 (http://www.macromedia.com/go/teammacromedia)

 Email:
 [EMAIL PROTECTED]
 Blog : www.camdenfamily.com/morpheus/blog
 Yahoo IM : morpheus

 My ally is the Force, and a powerful ally it is. - Yoda

  -Original Message-
  From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 16, 2003 3:40 PM
  To: CF-Talk
  Subject: RE: Can I Throw within cfscript???
 
 
  This won't work on my system running under NT  MX.
 
  Andy
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 16, 2003 3:53 PM
  To: CF-Talk
  Subject: RE: Can I Throw within cfscript???
 
 
  no need for wrapper...throw();
 
 http://www.mail-archive.com/[EMAIL PROTECTED]/msg145231.html
 for an example











~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm


RE: Can I Throw within cfscript???

2003-09-16 Thread Bryan F. Hogan
I should have read your email more closely. What you want is

cffunction name=throwException returntype=string output=false
cfscript
var throwExceptionReturn='';
throwExceptionReturn=I've been thrown to the wall,
ouch!;
/cfscript
cfreturn throwExceptionReturn
/cffunction

-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 16, 2003 8:12 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

First do you have a cfc file that has your function throw() in it? And
now your trying to call that function from a cfml page correct? So you
have a total of two pages, a cfc and a cfm page?

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 16, 2003 7:58 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

OK, now I am totally confused.  Please walk me through this...

I  have a CFC called FOO with a single method called Throw Exception:

FOO:
Function ThrowException
   throw(message=Test one);


what object am I instantiating within foo?

If I don't use scripting, the equivilent CFTHROW works perfectly.

Andy

-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 7:01 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


You have to create a reference to the cfc before you can call a function
from the cfc in your cfml.

Example:

Test.cfm
cfscript
myCFC=CreateObject('component','mycfcfilename');
myCFC.throw(message=I've been thrown to the wall, ouch!);
/cfscript

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 7:46 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Huh?

-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 6:45 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


Andy you still have to init your library.

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 7:29 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Create a complete page with only the following:

cfscript
   throw(message=Test one);
/cfscript

When you execute it, Variable THROW is undefined is thrown.

Andy


-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 5:13 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


foo(x=y z=a) is not valid in cfml. The example in the link below does
not do that. You should instead do:

foo(y,a)

or

foo(x=y,z=a)




===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)

Email: [EMAIL PROTECTED]
Blog : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

My ally is the Force, and a powerful ally it is. - Yoda

 -Original Message-
 From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 4:03 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???


 Raymond,

 CFFunction works, what doesn't is:

 cfscript
   throw(type=ValidationError Message=This just wont work);
   ...

 Andy

 -Original Message-
 From: Raymond Camden [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 4:50 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???


 Why not? Every OS running CFMX will support cffunction.

 ==
 ==
 ===
 Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
 (www.mindseye.com)
 Member of Team Macromedia
 (http://www.macromedia.com/go/teammacromedia)

 Email:
 [EMAIL PROTECTED]
 Blog : www.camdenfamily.com/morpheus/blog
 Yahoo IM : morpheus

 My ally is the Force, and a powerful ally it is. - Yoda

  -Original Message-
  From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 16, 2003 3:40 PM
  To: CF-Talk
  Subject: RE: Can I Throw within cfscript???
 
 
  This won't work on my system running under NT  MX.
 
  Andy
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 16, 2003 3:53 PM
  To: CF-Talk
  Subject: RE: Can I Throw within cfscript???
 
 
  no need for wrapper...throw();
 
 http://www.mail-archive.com/[EMAIL PROTECTED]/msg145231.html
 for an example












~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm


RE: Can I Throw within cfscript???

2003-09-16 Thread Andy Ousterhout
Correct.  Before, I was trying to simplify the problem to what I thought was
the root.

-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 7:12 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


First do you have a cfc file that has your function throw() in it? And
now your trying to call that function from a cfml page correct? So you
have a total of two pages, a cfc and a cfm page?

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 7:58 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

OK, now I am totally confused.  Please walk me through this...

I  have a CFC called FOO with a single method called Throw Exception:

FOO:
Function ThrowException
   throw(message=Test one);


what object am I instantiating within foo?

If I don't use scripting, the equivilent CFTHROW works perfectly.

Andy

-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 7:01 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


You have to create a reference to the cfc before you can call a function
from the cfc in your cfml.

Example:

Test.cfm
cfscript
myCFC=CreateObject('component','mycfcfilename');
myCFC.throw(message=I've been thrown to the wall, ouch!);
/cfscript

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 7:46 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Huh?

-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 6:45 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


Andy you still have to init your library.

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 7:29 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Create a complete page with only the following:

cfscript
   throw(message=Test one);
/cfscript

When you execute it, Variable THROW is undefined is thrown.

Andy


-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 5:13 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


foo(x=y z=a) is not valid in cfml. The example in the link below does
not do that. You should instead do:

foo(y,a)

or

foo(x=y,z=a)




===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)

Email: [EMAIL PROTECTED]
Blog : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

My ally is the Force, and a powerful ally it is. - Yoda

 -Original Message-
 From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 4:03 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???


 Raymond,

 CFFunction works, what doesn't is:

 cfscript
   throw(type=ValidationError Message=This just wont work);
   ...

 Andy

 -Original Message-
 From: Raymond Camden [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 4:50 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???


 Why not? Every OS running CFMX will support cffunction.

 ==
 ==
 ===
 Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
 (www.mindseye.com)
 Member of Team Macromedia
 (http://www.macromedia.com/go/teammacromedia)

 Email:
 [EMAIL PROTECTED]
 Blog : www.camdenfamily.com/morpheus/blog
 Yahoo IM : morpheus

 My ally is the Force, and a powerful ally it is. - Yoda

  -Original Message-
  From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 16, 2003 3:40 PM
  To: CF-Talk
  Subject: RE: Can I Throw within cfscript???
 
 
  This won't work on my system running under NT  MX.
 
  Andy
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 16, 2003 3:53 PM
  To: CF-Talk
  Subject: RE: Can I Throw within cfscript???
 
 
  no need for wrapper...throw();
 
 http://www.mail-archive.com/[EMAIL PROTECTED]/msg145231.html
 for an example












~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm


RE: Can I Throw within cfscript???

2003-09-16 Thread Bryan F. Hogan
If your trying to throw within your cfc use

Your.cfc
cffunction name=throwException returntype=string output=false
cfargument name=theString default= required=yes
cfscript
var throwExceptionReturn='';
throwExceptionReturn=Arguments.theString;
/cfscript
cfreturn throwExceptionReturn
/cffunction

your.cfm

cfscript
myCFC.CreateObject('component','your');
myCFC.throwException(message=hello);
/cfscript

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 16, 2003 8:45 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Correct.  Before, I was trying to simplify the problem to what I thought
was
the root.

-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 7:12 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


First do you have a cfc file that has your function throw() in it? And
now your trying to call that function from a cfml page correct? So you
have a total of two pages, a cfc and a cfm page?

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 7:58 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

OK, now I am totally confused.  Please walk me through this...

I  have a CFC called FOO with a single method called Throw Exception:

FOO:
Function ThrowException
   throw(message=Test one);


what object am I instantiating within foo?

If I don't use scripting, the equivilent CFTHROW works perfectly.

Andy

-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 7:01 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


You have to create a reference to the cfc before you can call a function
from the cfc in your cfml.

Example:

Test.cfm
cfscript
myCFC=CreateObject('component','mycfcfilename');
myCFC.throw(message=I've been thrown to the wall, ouch!);
/cfscript

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 7:46 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Huh?

-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 6:45 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


Andy you still have to init your library.

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 7:29 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Create a complete page with only the following:

cfscript
   throw(message=Test one);
/cfscript

When you execute it, Variable THROW is undefined is thrown.

Andy


-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 5:13 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


foo(x=y z=a) is not valid in cfml. The example in the link below does
not do that. You should instead do:

foo(y,a)

or

foo(x=y,z=a)




===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)

Email: [EMAIL PROTECTED]
Blog : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

My ally is the Force, and a powerful ally it is. - Yoda

 -Original Message-
 From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 4:03 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???


 Raymond,

 CFFunction works, what doesn't is:

 cfscript
   throw(type=ValidationError Message=This just wont work);
   ...

 Andy

 -Original Message-
 From: Raymond Camden [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 4:50 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???


 Why not? Every OS running CFMX will support cffunction.

 ==
 ==
 ===
 Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
 (www.mindseye.com)
 Member of Team Macromedia
 (http://www.macromedia.com/go/teammacromedia)

 Email:
 [EMAIL PROTECTED]
 Blog : www.camdenfamily.com/morpheus/blog
 Yahoo IM : morpheus

 My ally is the Force, and a powerful ally it is. - Yoda

  -Original Message-
  From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 16, 2003 3:40 PM
  To: CF-Talk
  Subject: RE: Can I Throw within cfscript???
 
 
  This won't work on my system running under NT  MX.
 
  Andy
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 16, 2003 3:53 PM
  To: CF-Talk
  Subject: RE: Can I Throw within cfscript???
 
 
  no need for wrapper...throw();
 
 http://www.mail-archive.com/[EMAIL PROTECTED]/msg145231.html
 for an example

RE: Can I Throw within cfscript???

2003-09-16 Thread Andy Ousterhout
Not what I am looking to do.  I wish for the method to stop processing when
I throw the exception and for control to return to the Try/Catch blocks.

-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 8:02 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


If your trying to throw within your cfc use

Your.cfc
cffunction name=throwException returntype=string output=false
cfargument name=theString default= required=yes
cfscript
var throwExceptionReturn='';
throwExceptionReturn=Arguments.theString;
/cfscript
cfreturn throwExceptionReturn
/cffunction

your.cfm

cfscript
myCFC.CreateObject('component','your');
myCFC.throwException(message=hello);
/cfscript

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 8:45 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Correct.  Before, I was trying to simplify the problem to what I thought
was
the root.

-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 7:12 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


First do you have a cfc file that has your function throw() in it? And
now your trying to call that function from a cfml page correct? So you
have a total of two pages, a cfc and a cfm page?

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 7:58 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

OK, now I am totally confused.  Please walk me through this...

I  have a CFC called FOO with a single method called Throw Exception:

FOO:
Function ThrowException
   throw(message=Test one);


what object am I instantiating within foo?

If I don't use scripting, the equivilent CFTHROW works perfectly.

Andy

-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 7:01 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


You have to create a reference to the cfc before you can call a function
from the cfc in your cfml.

Example:

Test.cfm
cfscript
myCFC=CreateObject('component','mycfcfilename');
myCFC.throw(message=I've been thrown to the wall, ouch!);
/cfscript

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 7:46 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Huh?

-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 6:45 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


Andy you still have to init your library.

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 7:29 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Create a complete page with only the following:

cfscript
   throw(message=Test one);
/cfscript

When you execute it, Variable THROW is undefined is thrown.

Andy


-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 5:13 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


foo(x=y z=a) is not valid in cfml. The example in the link below does
not do that. You should instead do:

foo(y,a)

or

foo(x=y,z=a)




===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)

Email: [EMAIL PROTECTED]
Blog : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

My ally is the Force, and a powerful ally it is. - Yoda

 -Original Message-
 From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 4:03 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???


 Raymond,

 CFFunction works, what doesn't is:

 cfscript
   throw(type=ValidationError Message=This just wont work);
   ...

 Andy

 -Original Message-
 From: Raymond Camden [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 4:50 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???


 Why not? Every OS running CFMX will support cffunction.

 ==
 ==
 ===
 Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
 (www.mindseye.com)
 Member of Team Macromedia
 (http://www.macromedia.com/go/teammacromedia)

 Email:
 [EMAIL PROTECTED]
 Blog : www.camdenfamily.com/morpheus/blog
 Yahoo IM : morpheus

 My ally is the Force, and a powerful ally it is. - Yoda

  -Original Message-
  From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 16, 2003 3:40 PM
  To: CF-Talk
  Subject: RE: Can I Throw within cfscript???
 
 
  This won't work on my system running under NT  MX.
 
  Andy

RE: Can I Throw within cfscript???

2003-09-16 Thread Bryan F. Hogan
Ok, I need some more information. Please post an example of your cfc and
your cfml page

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 16, 2003 9:00 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Not what I am looking to do.  I wish for the method to stop processing
when
I throw the exception and for control to return to the Try/Catch blocks.


~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com


RE: Can I Throw within cfscript???

2003-09-16 Thread Andy Ousterhout
Bryan,

Here is sample code.  First, observe that the two catch blocks behave
differently.  Second, can you replace the throw in Test with a script
statement without changing the other code?

cftry
cfset test()
cfcatch type=any
cfoutputCFCatch Exists - #IsDefined(cfcatch)#/cfoutput
/cfcatch
/cftry

cfscript
try {
test();
}
catch(Any excpt) {
writeoutput(brCFCatch Exists - #IsDefined(cfcatch)#);
}
/cfscript

cffunction name=Test
cfthrow message=This is a throw error
/cffunction

Andy
-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 8:18 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


Ok, I need some more information. Please post an example of your cfc and
your cfml page

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 9:00 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Not what I am looking to do.  I wish for the method to stop processing
when
I throw the exception and for control to return to the Try/Catch blocks.



~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm


RE: Can I Throw within cfscript???

2003-09-16 Thread Barney Boisvert
You can't.

You have to define a throw() function elsewhere that wraps the CFTHROW tag,
and include the definition before it's used.  But before you go down this
road too far, I would be quite surprised if the next version of CF doesn't
have a 'throw' keyword in CFSCRIPT.  I was utterly shocked when they added
try {} catch () {} without it.

If 'Test' will always be inside a CFC, then you can add a throw() method to
/WEB-INF/cftags/component.cfc so that all your CFCs would inherit the
method.  However, that would preclude you from distributing any application
that uses it.

barneyb


 -Original Message-
 From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 6:34 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???


 Bryan,

 Here is sample code.  First, observe that the two catch blocks behave
 differently.  Second, can you replace the throw in Test with a script
 statement without changing the other code?

 cftry
   cfset test()
   cfcatch type=any
   cfoutputCFCatch Exists - #IsDefined(cfcatch)#/cfoutput
   /cfcatch
 /cftry

 cfscript
   try {
   test();
   }
   catch(Any excpt) {
   writeoutput(brCFCatch Exists - #IsDefined(cfcatch)#);
   }
 /cfscript

 cffunction name=Test
   cfthrow message=This is a throw error
 /cffunction

 Andy

~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm


RE: Can I Throw within cfscript???

2003-09-16 Thread Bryan F. Hogan
Here is the answer

cftry
!--- This line throws error ---
cfset test1()
cfcatch type=any
cfoutput#test(message=CFCatch Exists -
#IsDefined(cfcatch)#)#/cfoutput
/cfcatch
/cftry
br
cfscript
try {
test1();
}
catch(Any excpt) {
writeoutput(test(message=CFCatch Exists -
#IsDefined(excpt)#));
}
/cfscript

cffunction name=Test
cfargument name=message
cfset myMessage=Arguments.message
cfreturn myMessage
/cffunction

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 16, 2003 9:34 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Bryan,

Here is sample code.  First, observe that the two catch blocks behave
differently.  Second, can you replace the throw in Test with a script
statement without changing the other code?

cftry
cfset test()
cfcatch type=any
cfoutputCFCatch Exists -
#IsDefined(cfcatch)#/cfoutput
/cfcatch
/cftry

cfscript
try {
test();
}
catch(Any excpt) {
writeoutput(brCFCatch Exists -
#IsDefined(cfcatch)#);
}
/cfscript

cffunction name=Test
cfthrow message=This is a throw error
/cffunction

Andy
-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 8:18 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


Ok, I need some more information. Please post an example of your cfc and
your cfml page

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 9:00 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Not what I am looking to do.  I wish for the method to stop processing
when
I throw the exception and for control to return to the Try/Catch blocks.




~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm


Try And Catch work differently then CFTRYCFCATCH (was RE: Can I Throw within cfscript???)

2003-09-16 Thread Andy Ousterhout
Barney,

Interestingly, as I noted in my previous email, TRY's and Catchs under
script operate differently.  So this is also a problem.  For example, cut
and past the following and run:

cftry
cfset test()
cfcatch type=any
cfoutputCFCatch Exists - #IsDefined(cfcatch)#/cfoutput
/cfcatch
/cftry

cfscript
try {
test();
}
catch(Any excpt) {
writeoutput(brCFCatch Exists - #IsDefined(cfcatch)#);
}
/cfscript

cffunction name=Test
cfthrow message=This is a throw error
/cffunction

Andy

-Original Message-
From: Barney Boisvert [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 8:49 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


You can't.

You have to define a throw() function elsewhere that wraps the CFTHROW tag,
and include the definition before it's used.  But before you go down this
road too far, I would be quite surprised if the next version of CF doesn't
have a 'throw' keyword in CFSCRIPT.  I was utterly shocked when they added
try {} catch () {} without it.

If 'Test' will always be inside a CFC, then you can add a throw() method to
/WEB-INF/cftags/component.cfc so that all your CFCs would inherit the
method.  However, that would preclude you from distributing any application
that uses it.

barneyb


 -Original Message-
 From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 6:34 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???


 Bryan,

 Here is sample code.  First, observe that the two catch blocks behave
 differently.  Second, can you replace the throw in Test with a script
 statement without changing the other code?

 cftry
   cfset test()
   cfcatch type=any
   cfoutputCFCatch Exists - #IsDefined(cfcatch)#/cfoutput
   /cfcatch
 /cftry

 cfscript
   try {
   test();
   }
   catch(Any excpt) {
   writeoutput(brCFCatch Exists - #IsDefined(cfcatch)#);
   }
 /cfscript

 cffunction name=Test
   cfthrow message=This is a throw error
 /cffunction

 Andy


~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm


RE: Try And Catch work differently then CFTRYCFCATCH (was RE: Can I Throw within cfscript???)

2003-09-16 Thread Bryan F. Hogan
Yes they do. The cfscript version of the try is a custom named type. So
in your case excpt is the equiv to cfcatch you do excpt.message in
cfscript in cfcatch you use cfcatch.message

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 16, 2003 9:54 PM
To: CF-Talk
Subject: Try And Catch work differently then CFTRYCFCATCH (was RE:
Can I Throw within cfscript???)

Barney,

Interestingly, as I noted in my previous email, TRY's and Catchs under
script operate differently.  So this is also a problem.  For example,
cut
and past the following and run:

cftry
cfset test()
cfcatch type=any
cfoutputCFCatch Exists -
#IsDefined(cfcatch)#/cfoutput
/cfcatch
/cftry

cfscript
try {
test();
}
catch(Any excpt) {
writeoutput(brCFCatch Exists -
#IsDefined(cfcatch)#);
}
/cfscript

cffunction name=Test
cfthrow message=This is a throw error
/cffunction

Andy

-Original Message-
From: Barney Boisvert [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 8:49 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


You can't.

You have to define a throw() function elsewhere that wraps the CFTHROW
tag,
and include the definition before it's used.  But before you go down
this
road too far, I would be quite surprised if the next version of CF
doesn't
have a 'throw' keyword in CFSCRIPT.  I was utterly shocked when they
added
try {} catch () {} without it.

If 'Test' will always be inside a CFC, then you can add a throw() method
to
/WEB-INF/cftags/component.cfc so that all your CFCs would inherit the
method.  However, that would preclude you from distributing any
application
that uses it.

barneyb


 -Original Message-
 From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 6:34 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???


 Bryan,

 Here is sample code.  First, observe that the two catch blocks behave
 differently.  Second, can you replace the throw in Test with a script
 statement without changing the other code?

 cftry
   cfset test()
   cfcatch type=any
   cfoutputCFCatch Exists -
#IsDefined(cfcatch)#/cfoutput
   /cfcatch
 /cftry

 cfscript
   try {
   test();
   }
   catch(Any excpt) {
   writeoutput(brCFCatch Exists -
#IsDefined(cfcatch)#);
   }
 /cfscript

 cffunction name=Test
   cfthrow message=This is a throw error
 /cffunction

 Andy



~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm


RE: Can I Throw within cfscript???

2003-09-16 Thread Andy Ousterhout
Bryan,
This is not the same code.  All you are doing is returning from a function
call.  You are NOT throwing an exception within test.

Andy


-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 9:03 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


Here is the answer

cftry
!--- This line throws error ---
cfset test1()
cfcatch type=any
cfoutput#test(message=CFCatch Exists -
#IsDefined(cfcatch)#)#/cfoutput
/cfcatch
/cftry
br
cfscript
try {
test1();
}
catch(Any excpt) {
writeoutput(test(message=CFCatch Exists -
#IsDefined(excpt)#));
}
/cfscript

cffunction name=Test
cfargument name=message
cfset myMessage=Arguments.message
cfreturn myMessage
/cffunction

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 9:34 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Bryan,

Here is sample code.  First, observe that the two catch blocks behave
differently.  Second, can you replace the throw in Test with a script
statement without changing the other code?

cftry
cfset test()
cfcatch type=any
cfoutputCFCatch Exists -
#IsDefined(cfcatch)#/cfoutput
/cfcatch
/cftry

cfscript
try {
test();
}
catch(Any excpt) {
writeoutput(brCFCatch Exists -
#IsDefined(cfcatch)#);
}
/cfscript

cffunction name=Test
cfthrow message=This is a throw error
/cffunction

Andy
-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 8:18 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


Ok, I need some more information. Please post an example of your cfc and
your cfml page

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 9:00 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Not what I am looking to do.  I wish for the method to stop processing
when
I throw the exception and for control to return to the Try/Catch blocks.





~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm


RE: Can I Throw within cfscript???

2003-09-16 Thread Bryan F. Hogan
-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 16, 2003 10:03 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Bryan,
This is not the same code.  All you are doing is returning from a
function
call.  You are NOT throwing an exception within test.

Andy


-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 9:03 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


Here is the answer

cftry
!--- This line throws error ---
cfset test1()
cfcatch type=any
cfoutput#test(message=CFCatch Exists -
#IsDefined(cfcatch)#)#/cfoutput
/cfcatch
/cftry
br
cfscript
try {
test1();
}
catch(Any excpt) {
writeoutput(test(message=CFCatch Exists -
#IsDefined(excpt)#));
}
/cfscript

cffunction name=Test
cfargument name=message
cfset myMessage=Arguments.message
cfreturn myMessage
/cffunction



~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm


RE: Can I Throw within cfscript???

2003-09-16 Thread Bryan F. Hogan
You _have_ to use cfthrow within test to throw within test.

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 16, 2003 10:03 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Bryan,
This is not the same code.  All you are doing is returning from a
function
call.  You are NOT throwing an exception within test.

Andy


-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 9:03 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


Here is the answer

cftry
!--- This line throws error ---
cfset test1()
cfcatch type=any
cfoutput#test(message=CFCatch Exists -
#IsDefined(cfcatch)#)#/cfoutput
/cfcatch
/cftry
br
cfscript
try {
test1();
}
catch(Any excpt) {
writeoutput(test(message=CFCatch Exists -
#IsDefined(excpt)#));
}
/cfscript

cffunction name=Test
cfargument name=message
cfset myMessage=Arguments.message
cfreturn myMessage
/cffunction

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 9:34 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Bryan,

Here is sample code.  First, observe that the two catch blocks behave
differently.  Second, can you replace the throw in Test with a script
statement without changing the other code?

cftry
cfset test()
cfcatch type=any
cfoutputCFCatch Exists -
#IsDefined(cfcatch)#/cfoutput
/cfcatch
/cftry

cfscript
try {
test();
}
catch(Any excpt) {
writeoutput(brCFCatch Exists -
#IsDefined(cfcatch)#);
}
/cfscript

cffunction name=Test
cfthrow message=This is a throw error
/cffunction

Andy
-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 8:18 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


Ok, I need some more information. Please post an example of your cfc and
your cfml page

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 9:00 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Not what I am looking to do.  I wish for the method to stop processing
when
I throw the exception and for control to return to the Try/Catch blocks.






~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm


RE: Can I Throw within cfscript???

2003-09-16 Thread Bryan F. Hogan
You can not throw a custom throw within the custom throw, you will have
to use cfthrow within your custom throw function

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 16, 2003 10:03 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Bryan,
This is not the same code.  All you are doing is returning from a
function
call.  You are NOT throwing an exception within test.

Andy


-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 9:03 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


Here is the answer

cftry
!--- This line throws error ---
cfset test1()
cfcatch type=any
cfoutput#test(message=CFCatch Exists -
#IsDefined(cfcatch)#)#/cfoutput
/cfcatch
/cftry
br
cfscript
try {
test1();
}
catch(Any excpt) {
writeoutput(test(message=CFCatch Exists -
#IsDefined(excpt)#));
}
/cfscript

cffunction name=Test
cfargument name=message
cfset myMessage=Arguments.message
cfreturn myMessage
/cffunction

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 9:34 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Bryan,

Here is sample code.  First, observe that the two catch blocks behave
differently.  Second, can you replace the throw in Test with a script
statement without changing the other code?

cftry
cfset test()
cfcatch type=any
cfoutputCFCatch Exists -
#IsDefined(cfcatch)#/cfoutput
/cfcatch
/cftry

cfscript
try {
test();
}
catch(Any excpt) {
writeoutput(brCFCatch Exists -
#IsDefined(cfcatch)#);
}
/cfscript

cffunction name=Test
cfthrow message=This is a throw error
/cffunction

Andy
-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 8:18 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


Ok, I need some more information. Please post an example of your cfc and
your cfml page

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 9:00 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???

Not what I am looking to do.  I wish for the method to stop processing
when
I throw the exception and for control to return to the Try/Catch blocks.






~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com


RE: Try And Catch work differently then CFTRYCFCATCH (was RE: Can I Throw within cfscript???)

2003-09-16 Thread Andy Ousterhout
Ah.  Light goes on

Thanks for being patient with me on this.

Andy

-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 9:11 PM
To: CF-Talk
Subject: RE: Try And Catch work differently then CFTRYCFCATCH (was
RE: Can I Throw within cfscript???)


Yes they do. The cfscript version of the try is a custom named type. So
in your case excpt is the equiv to cfcatch you do excpt.message in
cfscript in cfcatch you use cfcatch.message

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 9:54 PM
To: CF-Talk
Subject: Try And Catch work differently then CFTRYCFCATCH (was RE:
Can I Throw within cfscript???)

Barney,

Interestingly, as I noted in my previous email, TRY's and Catchs under
script operate differently.  So this is also a problem.  For example,
cut
and past the following and run:

cftry
cfset test()
cfcatch type=any
cfoutputCFCatch Exists -
#IsDefined(cfcatch)#/cfoutput
/cfcatch
/cftry

cfscript
try {
test();
}
catch(Any excpt) {
writeoutput(brCFCatch Exists -
#IsDefined(cfcatch)#);
}
/cfscript

cffunction name=Test
cfthrow message=This is a throw error
/cffunction

Andy

-Original Message-
From: Barney Boisvert [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 8:49 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???


You can't.

You have to define a throw() function elsewhere that wraps the CFTHROW
tag,
and include the definition before it's used.  But before you go down
this
road too far, I would be quite surprised if the next version of CF
doesn't
have a 'throw' keyword in CFSCRIPT.  I was utterly shocked when they
added
try {} catch () {} without it.

If 'Test' will always be inside a CFC, then you can add a throw() method
to
/WEB-INF/cftags/component.cfc so that all your CFCs would inherit the
method.  However, that would preclude you from distributing any
application
that uses it.

barneyb


 -Original Message-
 From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 6:34 PM
 To: CF-Talk
 Subject: RE: Can I Throw within cfscript???


 Bryan,

 Here is sample code.  First, observe that the two catch blocks behave
 differently.  Second, can you replace the throw in Test with a script
 statement without changing the other code?

 cftry
   cfset test()
   cfcatch type=any
   cfoutputCFCatch Exists -
#IsDefined(cfcatch)#/cfoutput
   /cfcatch
 /cftry

 cfscript
   try {
   test();
   }
   catch(Any excpt) {
   writeoutput(brCFCatch Exists -
#IsDefined(cfcatch)#);
   }
 /cfscript

 cffunction name=Test
   cfthrow message=This is a throw error
 /cffunction

 Andy




~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm


CFSCRIPT equiv. of CFPARAM?

2003-09-11 Thread Alexander Sherwood
Anyway to easily emulate CFPARAM using CFSCRIPT (without conditional logic?)

--
Alex Sherwood

~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm


RE: CFSCRIPT equiv. of CFPARAM?

2003-09-11 Thread Pascal Peters
No, but there is a UDF on cflib.org

-Original Message-
From: Alexander Sherwood [mailto:[EMAIL PROTECTED] 
Sent: donderdag 11 september 2003 16:30
To: CF-Talk
Subject: CFSCRIPT equiv. of CFPARAM?


Anyway to easily emulate CFPARAM using CFSCRIPT (without conditional
logic?)

--
Alex Sherwood


~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm


RE: CFSCRIPT equiv. of CFPARAM?

2003-09-11 Thread Ben Doom
cfparam uses conditional logic.  It simply hides it from you.

You could always right (or find) a UDF.


--  Ben Doom
Programmer  General Lackey
Moonbow Software, Inc 

: -Original Message-
: From: Alexander Sherwood [mailto:[EMAIL PROTECTED]
: Sent: Thursday, September 11, 2003 10:30 AM
: To: CF-Talk
: Subject: CFSCRIPT equiv. of CFPARAM?
: 
: 
: Anyway to easily emulate CFPARAM using CFSCRIPT (without 
: conditional logic?)
: 
: --
: Alex Sherwood
: 
: 
~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com


Re: CFSCRIPT equiv. of CFPARAM?

2003-09-11 Thread Neculai Macarie
function cf_param(var_name, default_value) {
 if(not isDefined(var_name))
  SetVariable(var_name, default_value);
}

mack /

- Original Message -
From: Alexander Sherwood [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Thursday, September 11, 2003 17:29
Subject: CFSCRIPT equiv. of CFPARAM?


 Anyway to easily emulate CFPARAM using CFSCRIPT (without conditional
logic?)

 --
 Alex Sherwood

 
~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm


CFLINCLUDE in CFSCRIPT

2003-09-11 Thread Michael Dinowitz
I'm redoing my CFSCRIPT docs and one of the things I'm adding in are all the
'extra' things you can do with it in CFMX. One such thing is a CFLOCATION using
GetPageContext().forward(somefile.cfm)
I believe that there was a CFINCLUDE type code as well, but I can't seem to find
it. If anyone remembers it, please let me know.
Thanks

p.s. the docs will be re-released both as a web doc and as a .chm stand alone
file. If people like it, I may do the same with other topics like RegEx.

Michael Dinowitz
Finding technical solutions to the problems you didn't know you had yet

~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com


Re: CFLINCLUDE in CFSCRIPT

2003-09-11 Thread Matt Liotta
 I'm redoing my CFSCRIPT docs and one of the things I'm adding in are 
 all the
 'extra' things you can do with it in CFMX. One such thing is a 
 CFLOCATION using
 GetPageContext().forward(somefile.cfm)
 I believe that there was a CFINCLUDE type code as well, but I can't 
 seem to find
 it. If anyone remembers it, please let me know.
 Thanks

You can do an include with getPageContext().include(somefile.cfm). 
However, it is not the same as doing a cfinclude. See a blog entry I 
made on the subject.
http://devilm.com/archives/37.html

Matt Liotta
President  CEO
Montara Software, Inc.
http://www.MontaraSoftware.com
(888) 408-0900 x901


~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com


RE: CFLINCLUDE in CFSCRIPT

2003-09-11 Thread Barney Boisvert
getPageContext.include(template); will do a JSP-style include.  Matt
Liotta blogged it a while back.  If the extension is .html or .htm, the
content will be included without CF processing.  if the extension is .cfm,
it will be processed by CF just like CFINCLUDE.

barneyb

---
Barney Boisvert, Senior Development Engineer
AudienceCentral
[EMAIL PROTECTED]
voice : 360.756.8080 x12
fax   : 360.647.5351

www.audiencecentral.com


 -Original Message-
 From: Michael Dinowitz [mailto:[EMAIL PROTECTED]
 Sent: Thursday, September 11, 2003 3:52 PM
 To: CF-Talk
 Subject: CFLINCLUDE in CFSCRIPT


 I'm redoing my CFSCRIPT docs and one of the things I'm adding in
 are all the
 'extra' things you can do with it in CFMX. One such thing is a
 CFLOCATION using
 GetPageContext().forward(somefile.cfm)
 I believe that there was a CFINCLUDE type code as well, but I
 can't seem to find
 it. If anyone remembers it, please let me know.
 Thanks

 p.s. the docs will be re-released both as a web doc and as a .chm
 stand alone
 file. If people like it, I may do the same with other topics like RegEx.

 Michael Dinowitz
 Finding technical solutions to the problems you didn't know you had yet

 
~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm


Re: CFLINCLUDE in CFSCRIPT

2003-09-11 Thread Michael Dinowitz
Perfect, thanks. I'll give you credit and a link in the docs to this (as well as
Charlie credit for his CFLOCATION portion).
Are there any solid docs on the GetPageContext() stuff?


  I'm redoing my CFSCRIPT docs and one of the things I'm adding in are
  all the
  'extra' things you can do with it in CFMX. One such thing is a
  CFLOCATION using
  GetPageContext().forward(somefile.cfm)
  I believe that there was a CFINCLUDE type code as well, but I can't
  seem to find
  it. If anyone remembers it, please let me know.
  Thanks
 
 You can do an include with getPageContext().include(somefile.cfm).
 However, it is not the same as doing a cfinclude. See a blog entry I
 made on the subject.
 http://devilm.com/archives/37.html

 Matt Liotta
 President  CEO
 Montara Software, Inc.
 http://www.MontaraSoftware.com
 (888) 408-0900 x901


 
~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com


Re: CFLINCLUDE in CFSCRIPT

2003-09-11 Thread Dave Carabetta
  I'm redoing my CFSCRIPT docs and one of the things I'm adding in are
  all the
  'extra' things you can do with it in CFMX. One such thing is a
  CFLOCATION using
  GetPageContext().forward(somefile.cfm)
  I believe that there was a CFINCLUDE type code as well, but I can't
  seem to find
  it. If anyone remembers it, please let me know.
  Thanks
 
You can do an include with getPageContext().include(somefile.cfm).
However, it is not the same as doing a cfinclude. See a blog entry I
made on the subject.
http://devilm.com/archives/37.html


For that matter, I think it's worth pointing out that cflocation and 
GetPageContext().forward(somefile.cfm) are not exactly the same either. 
One's a client-side redirect and the other's a server-side redirect. While 
the end result is the same, there are some important ramifications to 
consider when using each (i.e., the potential for duplicate form data 
submissions if the GetPageContext().forward(somefile.cfm) method is used 
and the user hits the Refresh button). For this reason (and some others), 
I have tended to stay away from the .forward() technique unless i have one 
back-end script that needs to pass info to another back-end page, or some 
other scenario where the user can't interfere.

Regards,
Dave.

_
Use custom emotions -- try MSN Messenger 6.0! 
http://www.msnmessenger-download.com/tracking/reach_emoticon

~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm


RE: CFLINCLUDE in CFSCRIPT

2003-09-11 Thread Tyler Silcox
This function peaks my interest once again. 

GetPageContext().Include(somefile.cfm) will parse a cfm page, but not htm
page (somefile.htm). So it has some internal parse switch to determine
whether or not to parse a relative link.

Sooo...is there some sub-function within GetPageContext() that might parse a
variable (that could be read from a file or created on the fly?

cfscript
// example (quick one)
Bob=I love ##BobsGirlfriend##, but this is a pound: ##.;
BobsGirlfriend=Jane;
GetPageContext().Parse(SomeString);
/cfscript

Would output: I love Jane, but this is a pound: #.

This isn't exactly what I'm talking about, but close. And I've been
searching high and low for something like this for a very long time...

Tyler

(I know this is a stretch, using GetPageContext() and all, but I can't seem
to find anything close to doing what I want)

-Original Message-
From: Michael Dinowitz [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 11, 2003 7:04 PM
To: CF-Talk
Subject: Re: CFLINCLUDE in CFSCRIPT

Perfect, thanks. I'll give you credit and a link in the docs to this (as
well as Charlie credit for his CFLOCATION portion).
Are there any solid docs on the GetPageContext() stuff?


  I'm redoing my CFSCRIPT docs and one of the things I'm adding in are 
  all the 'extra' things you can do with it in CFMX. One such thing is 
  a CFLOCATION using
  GetPageContext().forward(somefile.cfm)
  I believe that there was a CFINCLUDE type code as well, but I can't 
  seem to find it. If anyone remembers it, please let me know.
  Thanks
 
 You can do an include with getPageContext().include(somefile.cfm).
 However, it is not the same as doing a cfinclude. See a blog entry I 
 made on the subject.
 http://devilm.com/archives/37.html

 Matt Liotta
 President  CEO
 Montara Software, Inc.
 http://www.MontaraSoftware.com
 (888) 408-0900 x901


 

~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com


Re: CFLINCLUDE in CFSCRIPT

2003-09-11 Thread Michael Dinowitz
Got that already, thanks. Do you know of any other GetPageContext() pieces that
are floating around? I only remember those 2.


 For that matter, I think it's worth pointing out that cflocation and
 GetPageContext().forward(somefile.cfm) are not exactly the same either.
 One's a client-side redirect and the other's a server-side redirect. While
 the end result is the same, there are some important ramifications to
 consider when using each (i.e., the potential for duplicate form data
 submissions if the GetPageContext().forward(somefile.cfm) method is used
 and the user hits the Refresh button). For this reason (and some others),
 I have tended to stay away from the .forward() technique unless i have one
 back-end script that needs to pass info to another back-end page, or some
 other scenario where the user can't interfere.

 Regards,
 Dave.

 _
 Use custom emotions -- try MSN Messenger 6.0!
 http://www.msnmessenger-download.com/tracking/reach_emoticon

 
~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com


Re: CFLINCLUDE in CFSCRIPT

2003-09-11 Thread Michael Dinowitz
I think that it will use the internal mappings for the machine to try and run
the included page. I've got some docs from Apache on what this should allow and
will add them in soon as I get a second. I also want to test to see a few
things.
1. Does an included page inherit all vars from the calling page?
2. Does an included page act in the context of the calling page or is it called
separately? i.e. does an application.cfm get called for the included page
separately.



 This function peaks my interest once again.

 GetPageContext().Include(somefile.cfm) will parse a cfm page, but not htm
 page (somefile.htm). So it has some internal parse switch to determine
 whether or not to parse a relative link.

 Sooo...is there some sub-function within GetPageContext() that might parse a
 variable (that could be read from a file or created on the fly?

 cfscript
 // example (quick one)
 Bob=I love ##BobsGirlfriend##, but this is a pound: ##.;
 BobsGirlfriend=Jane;
 GetPageContext().Parse(SomeString);
 /cfscript

 Would output: I love Jane, but this is a pound: #.

 This isn't exactly what I'm talking about, but close. And I've been
 searching high and low for something like this for a very long time...

 Tyler

 (I know this is a stretch, using GetPageContext() and all, but I can't seem
 to find anything close to doing what I want)

 -Original Message-
 From: Michael Dinowitz [mailto:[EMAIL PROTECTED]
 Sent: Thursday, September 11, 2003 7:04 PM
 To: CF-Talk
 Subject: Re: CFLINCLUDE in CFSCRIPT

 Perfect, thanks. I'll give you credit and a link in the docs to this (as
 well as Charlie credit for his CFLOCATION portion).
 Are there any solid docs on the GetPageContext() stuff?


   I'm redoing my CFSCRIPT docs and one of the things I'm adding in are
   all the 'extra' things you can do with it in CFMX. One such thing is
   a CFLOCATION using
   GetPageContext().forward(somefile.cfm)
   I believe that there was a CFINCLUDE type code as well, but I can't
   seem to find it. If anyone remembers it, please let me know.
   Thanks
  
  You can do an include with getPageContext().include(somefile.cfm).
  However, it is not the same as doing a cfinclude. See a blog entry I
  made on the subject.
  http://devilm.com/archives/37.html
 
  Matt Liotta
  President  CEO
  Montara Software, Inc.
  http://www.MontaraSoftware.com
  (888) 408-0900 x901
 
 
 

 
~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm


RE: Quick cfscript if else ?

2003-08-21 Thread Ben Doom
if (form[qty#k#] = '')
{
newqty = 0;
}
else
{
newqty = form[qty#k#];
}

The brackets are, actually, optional in this case, but I always always
always use them.  That way, if I need to add more lines to the clause, I
don't fortet to add them.  :-)


--  Ben Doom
Programmer  General Lackey
Moonbow Software, Inc

: -Original Message-
: From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
: Sent: Thursday, August 21, 2003 3:51 PM
: To: CF-Talk
: Subject: Quick cfscript if else ?
:
:
: Not done much if something is this, then set this value...
:
: How far off am I?  Not seeing a good tutorial directly related to this...
: (ignore //)  ...in essence looking for a blank value and resetting to 0 or
: else use the numeric value passed...
:
:   //if form[qty#k#] = ''
:   //newqty = 0
:   //else
:   //newqty = evaluate(qty#k#)
:   //endif
:
:
: Thanks a mill in advance!!
:
:
: Regards,
:
: Eric J. Hoffman
: Technology Tamer
: DataStream Connexion
: www.datastreamconnexion.com
:
:
:
:
: 
~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com


RE: Quick cfscript if else ?

2003-08-21 Thread DURETTE, STEVEN J (AIT)
I believe it is:

cfscript
if(form[qty#k#] IS )
newqty = 0;
else
newqty = form[qty#k#];
/cfscript

Try to avoid the evaluate if possible.

Steve


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 3:51 PM
To: CF-Talk
Subject: Quick cfscript if else ?


Not done much if something is this, then set this value...

How far off am I?  Not seeing a good tutorial directly related to this...
(ignore //)  ...in essence looking for a blank value and resetting to 0 or
else use the numeric value passed...

//if form[qty#k#] = ''
//newqty = 0
//else
//newqty = evaluate(qty#k#)
//endif


Thanks a mill in advance!!


Regards,

Eric J. Hoffman
Technology Tamer
DataStream Connexion
www.datastreamconnexion.com





~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm


Quick cfscript if else ?

2003-08-21 Thread webmaster
Not done much if something is this, then set this value...

How far off am I?  Not seeing a good tutorial directly related to this...
(ignore //)  ...in essence looking for a blank value and resetting to 0 or
else use the numeric value passed...

//if form[qty#k#] = ''
//newqty = 0
//else
//newqty = evaluate(qty#k#)
//endif


Thanks a mill in advance!!


Regards,

Eric J. Hoffman
Technology Tamer
DataStream Connexion
www.datastreamconnexion.com




~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm


RE: Quick cfscript if else ?

2003-08-21 Thread Raymond Camden
I think you want

cfscript
if(form[qty#k#] is ) newqty = 0;
else newqty = form[qty#k#];
/cfsciprt



===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)

Email: [EMAIL PROTECTED]
Blog : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

My ally is the Force, and a powerful ally it is. - Yoda 

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, August 21, 2003 1:51 PM
 To: CF-Talk
 Subject: Quick cfscript if else ?
 
 
 Not done much if something is this, then set this value...
 
 How far off am I?  Not seeing a good tutorial directly 
 related to this... (ignore //)  ...in essence looking for a 
 blank value and resetting to 0 or else use the numeric value passed...
 
   //if form[qty#k#] = ''
   //newqty = 0
   //else
   //newqty = evaluate(qty#k#)
   //endif
 
 
 Thanks a mill in advance!!
 
 
 Regards,
 
 Eric J. Hoffman
 Technology Tamer
 DataStream Connexion
 www.datastreamconnexion.com
 
 
 
 
 
~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com


Quick cfscript if else ?

2003-08-21 Thread Mike Mertsock
Raymond and Steven, you are correct by using if(form[qty#k#] is ). When writing 
CFSCRIPT code, you use the same comparison and assignment operators that you would use 
in any CF tag.

To assign a value:
variablename = value;

To check if equal:
if ( form.something eq 3 ) ...

To use modulo:
x = y mod 10;

And so on.

Mike Mertsock
Alfred University Web Team

I think you want

cfscript
if(form[qty#k#] is ) newqty = 0;
else newqty = form[qty#k#];
/cfsciprt
~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm


Redirect within cfscript?

2003-08-14 Thread Cedric Villat
 Is there a cflocation equivalent that I can use from within a cfscript block? I can't 
see to find anything.

Cedric 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: Redirect within cfscript?

2003-08-10 Thread Raymond Camden
Not using 'normal' cf syntax, but if you are using MX you can write a
UDF that will do a cflocation for you. See cflib.org for an example.


===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)

Email: [EMAIL PROTECTED]
Blog : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

My ally is the Force, and a powerful ally it is. - Yoda 

 -Original Message-
 From: Cedric Villat [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, August 05, 2003 3:38 PM
 To: CF-Talk
 Subject: Redirect within cfscript?
 
 
  Is there a cflocation equivalent that I can use from within 
 a cfscript block? I can't see to find anything.
 

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Cookies in cfscript block

2003-07-23 Thread Joe Eugene
I think have done this before... can figure it out.

How do you write Domain, Path etc information , when writing
cookies in cfscript blocks.?

e.g
cfscript
 myCookie = cookieValue; // Is there a way to specify domain and path
here?
/cfscript

I tried  cookie.test=hello;domain=.mydomain.com;;//doesnt work.

Thanks
Joe Eugene



~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



CFAbort in CFScript?

2003-07-14 Thread Shawn Grover
I think this is a stupid question, but is there any way to end processing of
a CF page from within CFScript similar to a CFAbort.

I know CFAbort is a tag, and tags can't be used in cfscript.  However, there
have been so many other improvements to CF with the MX release that I
wouldn't be surprised if there is a method to do this.  Thus far, I have not
found a way to do so, which means I have to set an abort flag within the
cfscript block, then check this flag and abort when I close the block.  This
isn't too much of a problem to do, but I'm curious if there's a way to put
the exit command where it makes the most sense.  

Thanks for any responses.

Shawn
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: CFAbort in CFScript?

2003-07-14 Thread Raymond Camden
You can write a UDF to mimic cfabort. You can find one at cflib.org.


===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)

Email: [EMAIL PROTECTED]
Blog : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

My ally is the Force, and a powerful ally it is. - Yoda 

 -Original Message-
 From: Shawn Grover [mailto:[EMAIL PROTECTED] 
 Sent: Monday, July 14, 2003 4:45 PM
 To: CF-Talk
 Subject: CFAbort in CFScript?
 
 
 I think this is a stupid question, but is there any way to 
 end processing of a CF page from within CFScript similar to a CFAbort.
 
 I know CFAbort is a tag, and tags can't be used in cfscript.  
 However, there have been so many other improvements to CF 
 with the MX release that I wouldn't be surprised if there is 
 a method to do this.  Thus far, I have not found a way to do 
 so, which means I have to set an abort flag within the 
 cfscript block, then check this flag and abort when I close 
 the block.  This isn't too much of a problem to do, but I'm 
 curious if there's a way to put the exit command where it 
 makes the most sense.  
 


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: CFAbort in CFScript?

2003-07-14 Thread Dave Watts
 I know CFAbort is a tag, and tags can't be used in cfscript.

In general, nearly any CFML tag can now be used within CFSCRIPT, if you're
willing to write a wrapper for it using CFFUNCTION.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



GetPageContext() function...cfinclude from a cfscript?

2003-07-08 Thread Tyler Silcox
Could someone please explain what GetPageContext() does within CFMX?  I just
came across it in one of the other posts and it got me thinking about using
GetPageContext().include(somefile.cfm) for cfincludes within cfscripts,
but it doesn't seem to share the same memory/variables (which, I guess,
could be a benefit.)  What is possible with this tag?  Is it slow?  What
other functions are available, etc?  I've gotta know!
 
Tyler

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: GetPageContext() function...cfinclude from a cfscript?

2003-07-08 Thread Robertson-Ravo, Neil (RX)
I believe it is used for J2EE development (though probably not only that).
It provides access to system class functions from within a page to call
variables and scopes etc...




-Original Message-
From: Tyler Silcox [mailto:[EMAIL PROTECTED]
Sent: 08 July 2003 13:56
To: CF-Talk
Subject: GetPageContext() function...cfinclude from a cfscript?


Could someone please explain what GetPageContext() does within CFMX?  I just
came across it in one of the other posts and it got me thinking about using
GetPageContext().include(somefile.cfm) for cfincludes within cfscripts,
but it doesn't seem to share the same memory/variables (which, I guess,
could be a benefit.)  What is possible with this tag?  Is it slow?  What
other functions are available, etc?  I've gotta know!
 
Tyler


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: GetPageContext() function...cfinclude from a cfscript?

2003-07-08 Thread Robertson-Ravo, Neil (RX)
I think, there are probably people who know a shit load more about than
that!

-Original Message-
From: Robertson-Ravo, Neil (RX)
[mailto:[EMAIL PROTECTED]
Sent: 08 July 2003 14:03
To: CF-Talk
Subject: RE: GetPageContext() function...cfinclude from a cfscript?


I believe it is used for J2EE development (though probably not only that).
It provides access to system class functions from within a page to call
variables and scopes etc...




-Original Message-
From: Tyler Silcox [mailto:[EMAIL PROTECTED]
Sent: 08 July 2003 13:56
To: CF-Talk
Subject: GetPageContext() function...cfinclude from a cfscript?


Could someone please explain what GetPageContext() does within CFMX?  I just
came across it in one of the other posts and it got me thinking about using
GetPageContext().include(somefile.cfm) for cfincludes within cfscripts,
but it doesn't seem to share the same memory/variables (which, I guess,
could be a benefit.)  What is possible with this tag?  Is it slow?  What
other functions are available, etc?  I've gotta know!
 
Tyler



~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: GetPageContext() function...cfinclude from a cfscript?

2003-07-08 Thread Andre Mohamed
GetPageContext() allows you to gain access to the underlying JSP/Servlet
page context.

This allows you to share sessions and requests with JSP's and Servlets
as well as letting you perform server-side re-directs and forwards.
cflocation as I'm sure you know performs a client-side redirect.

The full scope of possibilities that access to the page context is not
covered here. For more information refer to your CF Documentation
(Integrating J2EE and Java elements in CFML Applications)

For more information on methods available to the page context refer to
the JSP/Servlet API's available from java.sun.com. Alternatively, look
for any JSP tutorial that mentions the context.

That should get you on your way.


André
-Original Message-
From: Tyler Silcox [mailto:[EMAIL PROTECTED] 
Sent: 08 July 2003 13:56
To: CF-Talk
Subject: GetPageContext() function...cfinclude from a cfscript?

Could someone please explain what GetPageContext() does within CFMX?  I
just
came across it in one of the other posts and it got me thinking about
using
GetPageContext().include(somefile.cfm) for cfincludes within
cfscripts,
but it doesn't seem to share the same memory/variables (which, I guess,
could be a benefit.)  What is possible with this tag?  Is it slow?  What
other functions are available, etc?  I've gotta know!
 
Tyler


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: GetPageContext() function...cfinclude from a cfscript?

2003-07-08 Thread webguy
The Sun definition : An object bound into the context associated with a
servlet.

The GetPageContext returns the context for a servlet or JSP page.

It really does what it says on the tin, it returns the context, which
simplified  means  /x/y/z/myservlet or whatever.
The servlet needs this when it uses other Java elements and classes, so that
the so they can be bound into that context and can use other variables
available in the same context. Remember the same java objects maybe used by
many programs in many contexts, so the jvm has to be able tosupply the
correct variables, resources etc.

WG


-Original Message-
From: Robertson-Ravo, Neil (RX)
[mailto:[EMAIL PROTECTED]
Sent: 08 July 2003 14:06
To: CF-Talk
Subject: RE: GetPageContext() function...cfinclude from a cfscript?


I think, there are probably people who know a shit load more about than
that!

-Original Message-
From: Robertson-Ravo, Neil (RX)
[mailto:[EMAIL PROTECTED]
Sent: 08 July 2003 14:03
To: CF-Talk
Subject: RE: GetPageContext() function...cfinclude from a cfscript?


I believe it is used for J2EE development (though probably not only that).
It provides access to system class functions from within a page to call
variables and scopes etc...




-Original Message-
From: Tyler Silcox [mailto:[EMAIL PROTECTED]
Sent: 08 July 2003 13:56
To: CF-Talk
Subject: GetPageContext() function...cfinclude from a cfscript?


Could someone please explain what GetPageContext() does within CFMX?  I just
came across it in one of the other posts and it got me thinking about using
GetPageContext().include(somefile.cfm) for cfincludes within cfscripts,
but it doesn't seem to share the same memory/variables (which, I guess,
could be a benefit.)  What is possible with this tag?  Is it slow?  What
other functions are available, etc?  I've gotta know!

Tyler




~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: GetPageContext() function...cfinclude from a cfscript?

2003-07-08 Thread Dan G. Switzer, II
If you want an include function for use w/CFSCRIPT, in CFMX you could just
create a UDF that uses the CFINCLUDE tag. 

-Dan

 -Original Message-
 From: Tyler Silcox [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, July 08, 2003 8:56 AM
 To: CF-Talk
 Subject: GetPageContext() function...cfinclude from a cfscript?
 
 Could someone please explain what GetPageContext() does within CFMX?  I
 just
 came across it in one of the other posts and it got me thinking about
 using
 GetPageContext().include(somefile.cfm) for cfincludes within cfscripts,
 but it doesn't seem to share the same memory/variables (which, I guess,
 could be a benefit.)  What is possible with this tag?  Is it slow?  What
 other functions are available, etc?  I've gotta know!
 
 Tyler
 
 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: GetPageContext() function...cfinclude from a cfscript?

2003-07-08 Thread Tyler Silcox
I've tried that and it's a pain in the arse... 

-Original Message-
From: Dan G. Switzer, II [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 08, 2003 9:26 AM
To: CF-Talk
Subject: RE: GetPageContext() function...cfinclude from a cfscript?

If you want an include function for use w/CFSCRIPT, in CFMX you could just
create a UDF that uses the CFINCLUDE tag. 

-Dan

 -Original Message-
 From: Tyler Silcox [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, July 08, 2003 8:56 AM
 To: CF-Talk
 Subject: GetPageContext() function...cfinclude from a cfscript?
 
 Could someone please explain what GetPageContext() does within CFMX?  
 I just came across it in one of the other posts and it got me thinking 
 about using
 GetPageContext().include(somefile.cfm) for cfincludes within 
 cfscripts, but it doesn't seem to share the same memory/variables 
 (which, I guess, could be a benefit.)  What is possible with this tag?  
 Is it slow?  What other functions are available, etc?  I've gotta know!
 
 Tyler
 
 

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: GetPageContext() function...cfinclude from a cfscript?

2003-07-08 Thread Raymond Camden
Really? 

cffunction name=include
cfargument name=template
cfinclude template=#template#
/cffunction

Boy, that was hard. ;) Normally I'd define returntype, type on the
argument, etc.


===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)

Email: [EMAIL PROTECTED]
Blog : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

My ally is the Force, and a powerful ally it is. - Yoda 

 -Original Message-
 From: Tyler Silcox [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, July 08, 2003 8:21 AM
 To: CF-Talk
 Subject: RE: GetPageContext() function...cfinclude from a cfscript?
 
 
 I've tried that and it's a pain in the arse... 
 
 -Original Message-
 From: Dan G. Switzer, II [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, July 08, 2003 9:26 AM
 To: CF-Talk
 Subject: RE: GetPageContext() function...cfinclude from a cfscript?
 
 If you want an include function for use w/CFSCRIPT, in CFMX 
 you could just create a UDF that uses the CFINCLUDE tag. 
 
 -Dan
 
  -Original Message-
  From: Tyler Silcox [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, July 08, 2003 8:56 AM
  To: CF-Talk
  Subject: GetPageContext() function...cfinclude from a cfscript?
  
  Could someone please explain what GetPageContext() does within CFMX?
  I just came across it in one of the other posts and it got 
 me thinking 
  about using
  GetPageContext().include(somefile.cfm) for cfincludes within 
  cfscripts, but it doesn't seem to share the same memory/variables 
  (which, I guess, could be a benefit.)  What is possible 
 with this tag?  
  Is it slow?  What other functions are available, etc?  I've 
 gotta know!
  
  Tyler
  
  
 
 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: GetPageContext() function...cfinclude from a cfscript?

2003-07-08 Thread Tyler Silcox
 I've tried that and it's a pain in the arse... 

I knew I shouldn't have laid out such a empty statement, but I've tried that
exact UDF before and it threw some crazy errors-but I, of course, have no
idea what the errors were...I'll see if I can recreate them and let you
know-

Tyler

-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 08, 2003 11:01 AM
To: CF-Talk
Subject: RE: GetPageContext() function...cfinclude from a cfscript?

Really? 

cffunction name=include
cfargument name=template
cfinclude template=#template#
/cffunction

Boy, that was hard. ;) Normally I'd define returntype, type on the argument,
etc.


===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)

Email: [EMAIL PROTECTED]
Blog : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

My ally is the Force, and a powerful ally it is. - Yoda

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: GetPageContext() function...cfinclude from a cfscript?

2003-07-08 Thread Dan G. Switzer, II
  I've tried that and it's a pain in the arse...
 
 I knew I shouldn't have laid out such a empty statement, but I've tried
 that
 exact UDF before and it threw some crazy errors-but I, of course, have no
 idea what the errors were...I'll see if I can recreate them and let you
 know-

I wonder if this would expose the page context bug? I haven't actually tried
doing this, but maybe it's a problem with variables declared in the
variables scope.

- Dan
 ... 
: Name:   Dan G. Switzer, II:
: E-mail: [EMAIL PROTECTED]   :
: Blog:   http://blog.pengoworks.com/   :
:...:


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



CFSCRIPT

2003-06-26 Thread Gabriel Robichaud
Hey folks.

questions regarding scripting.

I want to see YY as 0 not 0.25

and i want to use the modulus operator (or modulo, dont know what to 
call it in english) so i can get the remainder.  I dont know what the 
operator is for cfscript.  obvious answer is % but that doesnt work.

So how do i get my #resutl# to equal 0 (an integer and not a decimal)
and how do i get the remainder of a devision in #remainder#? (see code 
below for clarification)


**CODE HERE
cfscript

YY = DateFormat(NOW(), YY);

result = YY/12;

remainder = YY%12;

/cfscript

cfoutput
BrBR
The result is : font size=+4#result#/fontBR
The remainder is : font size=+4#remainder#/fontBR

/cfoutput
**NO MORE CODE**

Any thoughts?

Thanks
Gabriel

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: CFSCRIPT

2003-06-26 Thread CF Dude
Have you tried using MOD instead of %?

- Original Message - 
From: Gabriel Robichaud [EMAIL PROTECTED]

and i want to use the modulus operator (or modulo, dont know what to 
call it in english) so i can get the remainder.  I dont know what the 
operator is for cfscript.  obvious answer is % but that doesnt work.

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: CFSCRIPT

2003-06-26 Thread Nagy, Daniel J
% = MOD 

Int() will return a float as a whole number.

-Original Message-
From: Gabriel Robichaud [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 26, 2003 1:56 PM
To: CF-Talk
Subject: CFSCRIPT


Hey folks.

questions regarding scripting.

I want to see YY as 0 not 0.25

and i want to use the modulus operator (or modulo, dont know what to 
call it in english) so i can get the remainder.  I dont know what the 
operator is for cfscript.  obvious answer is % but that doesnt work.

So how do i get my #resutl# to equal 0 (an integer and not a decimal)
and how do i get the remainder of a devision in #remainder#? (see code 
below for clarification)


**CODE HERE
cfscript

YY = DateFormat(NOW(), YY);

result = YY/12;

remainder = YY%12;

/cfscript

cfoutput
BrBR
The result is : font size=+4#result#/fontBR
The remainder is : font size=+4#remainder#/fontBR

/cfoutput
**NO MORE CODE**

Any thoughts?

Thanks
Gabriel


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: CFSCRIPT

2003-06-26 Thread Gabriel Robichaud
perfect thanks!!

Nagy, Daniel J wrote:
 % = MOD 
 
 Int() will return a float as a whole number.
 
 -Original Message-
 From: Gabriel Robichaud [mailto:[EMAIL PROTECTED]
 Sent: Thursday, June 26, 2003 1:56 PM
 To: CF-Talk
 Subject: CFSCRIPT
 
 
 Hey folks.
 
 questions regarding scripting.
 
 I want to see YY as 0 not 0.25
 
 and i want to use the modulus operator (or modulo, dont know what to 
 call it in english) so i can get the remainder.  I dont know what the 
 operator is for cfscript.  obvious answer is % but that doesnt work.
 
 So how do i get my #resutl# to equal 0 (an integer and not a decimal)
 and how do i get the remainder of a devision in #remainder#? (see code 
 below for clarification)
 
 
 **CODE HERE
 cfscript
 
 YY = DateFormat(NOW(), YY);
 
 result = YY/12;
 
 remainder = YY%12;
 
 /cfscript
 
 cfoutput
 BrBR
 The result is : font size=+4#result#/fontBR
 The remainder is : font size=+4#remainder#/fontBR
 
 /cfoutput
 **NO MORE CODE**
 
 Any thoughts?
 
 Thanks
 Gabriel
 
 
 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: CFSCRIPT syntax

2003-06-20 Thread Calvin Ward
I can add the following snippet to the conversation:

Guidelines for using pound signs
Follow these guidelines when using pound signs:
 Use pound signs to distinguish variables or functions from plain text.
 Surround only a single variable or function in pound signs; for
example, #Variables.myVar# or #Left (myString,position)#. However, a
function in pound signs can contain nested functions, such as
#Left(trim(myString), position)#.
 Do not enclose complex expressions, such as 1 + 2, with pound signs.
 Do not use pound signs when using the cfset tag to assign one
variable's value to another value.
 Use pound signs only where necessary, because unneeded pound signs slow
processing.


ref:
http://www.macromedia.com/support/coldfusion/getting_started/using_poundsigns_quotat/using_poundsigns_quotat02.html

HTH,

Calvin



- Original Message - 
From: Matthew Walker [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Thursday, June 19, 2003 10:23 PM
Subject: RE: CFSCRIPT syntax


 Hi Mark,

 Just to add to Raymond's comments,

 I think the confusion about hashes and quotes comes about from CF tags,
 where you DO need them when you are passing a numeric or a variable as an
 attribute, i.e.

 cfquery datasource=#mydsn# maxrows=#maxrows#

 In any other situation, you only need quotes around strings, and you only
 need hashes when inserting an expression into a string or cfoutputting
 it More or less.

  4) Can a CFPARAM statement be written in CFSCRIPT?  If so, how?

 Take a look at this udf:
 http://www.cflib.org/udf.cfm?ID=144



 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: CFSCRIPT syntax

2003-06-20 Thread Matthew Walker
  Do not enclose complex expressions, such as 1 + 2, with pound signs.

Curiously enough you can do this with CFMX. 

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: CFSCRIPT syntax

2003-06-20 Thread DURETTE, STEVEN J (AIT)
Another point to consider is that sometimes you have no choice but to use
the pound signs.

This one bit me recently.

cfparam name=Form.date default=now() sets the Form.date variable to
now().

I ended up putting the quotes and the pound signs back in.

As for the previous question on doing a cfparam inside of cfscript, I THINK
(don't hold me to this) that the only way to do this is:

cfscript
if(not isDefined(FORM.Date)) FORM.Date = Now();
/cfscript

Of course, this uses the example above and would require more code if you
wanted to ensure the type of data that was coming in.

Steve


-Original Message-
From: Calvin Ward [mailto:[EMAIL PROTECTED]
Sent: Friday, June 20, 2003 7:31 AM
To: CF-Talk
Subject: Re: CFSCRIPT syntax


I can add the following snippet to the conversation:

Guidelines for using pound signs
Follow these guidelines when using pound signs:
 Use pound signs to distinguish variables or functions from plain text.
 Surround only a single variable or function in pound signs; for
example, #Variables.myVar# or #Left (myString,position)#. However, a
function in pound signs can contain nested functions, such as
#Left(trim(myString), position)#.
 Do not enclose complex expressions, such as 1 + 2, with pound signs.
 Do not use pound signs when using the cfset tag to assign one
variable's value to another value.
 Use pound signs only where necessary, because unneeded pound signs slow
processing.


ref:
http://www.macromedia.com/support/coldfusion/getting_started/using_poundsign
s_quotat/using_poundsigns_quotat02.html

HTH,

Calvin



- Original Message - 
From: Matthew Walker [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Thursday, June 19, 2003 10:23 PM
Subject: RE: CFSCRIPT syntax


 Hi Mark,

 Just to add to Raymond's comments,

 I think the confusion about hashes and quotes comes about from CF tags,
 where you DO need them when you are passing a numeric or a variable as an
 attribute, i.e.

 cfquery datasource=#mydsn# maxrows=#maxrows#

 In any other situation, you only need quotes around strings, and you only
 need hashes when inserting an expression into a string or cfoutputting
 it More or less.

  4) Can a CFPARAM statement be written in CFSCRIPT?  If so, how?

 Take a look at this udf:
 http://www.cflib.org/udf.cfm?ID=144



 

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



CFSCRIPT syntax

2003-06-19 Thread Mark Leder
Hi All,
I'm going through some code and converting CFSET commands to CFSCRIPT -- a
couple of syntax questions:

1) Where I have a cfset SESSION.ecom.storeVar = SESSION.ecom.s
   Should I surround the var with quotes or not? Ie:
SESSION.ecom.storeVar = SESSION.ecom.s;

2) Similarly, where I have a cfset SESSION.ecom.admin = #URL.admin#
   Should I surround the var with quotes or not?  Ie:
SESSION.ecom.admin = #URL.admin#;

3) With numeric values, do I need to surround with quotes, ie:
SESSION.ecom.totalCost = 0;

4) Can a CFPARAM statement be written in CFSCRIPT?  If so, how?

Thanks, Mark 

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: CFSCRIPT syntax

2003-06-19 Thread Raymond Camden
 1) Where I have a cfset SESSION.ecom.storeVar = SESSION.ecom.s
Should I surround the var with quotes or not? Ie:
   SESSION.ecom.storeVar = SESSION.ecom.s;

No.

 2) Similarly, where I have a cfset SESSION.ecom.admin = #URL.admin#
Should I surround the var with quotes or not?  Ie:
   SESSION.ecom.admin = #URL.admin#;

Don't use the pound signs, you don't need them:

cfset session.ecom.admin = url.admin
cfscript
session.ecom.admin = url.admin;
/cfscript

 3) With numeric values, do I need to surround with quotes, ie:
   SESSION.ecom.totalCost = 0;

No.

 4) Can a CFPARAM statement be written in CFSCRIPT?  If so, how?
No, but you can simply do:

cfscript
if(not isDefined(url.foo)) url.foo = 1;
/cfscript


===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)

Email: [EMAIL PROTECTED]
Blog : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

My ally is the Force, and a powerful ally it is. - Yoda 

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: CFSCRIPT syntax

2003-06-19 Thread Matthew Walker
Hi Mark,

Just to add to Raymond's comments,

I think the confusion about hashes and quotes comes about from CF tags,
where you DO need them when you are passing a numeric or a variable as an
attribute, i.e. 

cfquery datasource=#mydsn# maxrows=#maxrows# 

In any other situation, you only need quotes around strings, and you only
need hashes when inserting an expression into a string or cfoutputting
it More or less.

 4) Can a CFPARAM statement be written in CFSCRIPT?  If so, how?

Take a look at this udf:
http://www.cflib.org/udf.cfm?ID=144
 


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



switch in CFSCRIPT

2003-06-06 Thread CF Dude
Is there a way to do multiple values per case statement when doing a switch inside of 
a cfscript tag?

cfscript
  switch (iAnsType){
case 6 :
sAnswer = Replace(sAnswer, ,, |, ALL);
   case 7 :
sAnswer = Replace(sAnswer, ,, |, ALL);
  }
/cfscript

EG, I was hoping to do this

cfscript
  switch (iAnsType){
case 6, 7 :
sAnswer = Replace(sAnswer, ,, |, ALL);
  }
/cfscript

Eric
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: switch in CFSCRIPT

2003-06-06 Thread DURETTE, STEVEN J (AIT)
This should do what you are looking for:

cfscript
  switch (iAnsType){
case 6 :
case 7 :
sAnswer = Replace(sAnswer, ,, |, ALL);
  }
/cfscript

-Original Message-
From: CF Dude [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 12:39 PM
To: CF-Talk
Subject: switch in CFSCRIPT


Is there a way to do multiple values per case statement when doing a switch
inside of a cfscript tag?

cfscript
  switch (iAnsType){
case 6 :
sAnswer = Replace(sAnswer, ,, |, ALL);
   case 7 :
sAnswer = Replace(sAnswer, ,, |, ALL);
  }
/cfscript

EG, I was hoping to do this

cfscript
  switch (iAnsType){
case 6, 7 :
sAnswer = Replace(sAnswer, ,, |, ALL);
  }
/cfscript

Eric

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: switch in CFSCRIPT

2003-06-06 Thread Adrian Lynch
I think you just use something like below, syntax might be a little(or alot)
wrong though

cfscript
switch (iAnsType) {
case 6:
case 7:
sAnswer = Replace.;
}
/cfscript

Ade

-Original Message-
From: CF Dude [mailto:[EMAIL PROTECTED]
Sent: 05 June 2003 17:39
To: CF-Talk
Subject: switch in CFSCRIPT


Is there a way to do multiple values per case statement when doing a switch
inside of a cfscript tag?

cfscript
  switch (iAnsType){
case 6 :
sAnswer = Replace(sAnswer, ,, |, ALL);
   case 7 :
sAnswer = Replace(sAnswer, ,, |, ALL);
  }
/cfscript

EG, I was hoping to do this

cfscript
  switch (iAnsType){
case 6, 7 :
sAnswer = Replace(sAnswer, ,, |, ALL);
  }
/cfscript

Eric

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: switch in CFSCRIPT

2003-06-06 Thread Philip Arnold
Also, don't forget to put a break; after your code in the case

So, it should be;

cfscript
   switch (iAnsType){
 case 6 :
 case 7 :
 {sAnswer = Replace(sAnswer, ,, |, ALL);
  break;
 }
   }
/cfscript

 Is there a way to do multiple values per case statement when
 doing a switch inside of a cfscript tag?

 cfscript
   switch (iAnsType){
 case 6 :
 sAnswer = Replace(sAnswer, ,, |, ALL);
case 7 :
 sAnswer = Replace(sAnswer, ,, |, ALL);
   }
 /cfscript

 EG, I was hoping to do this

 cfscript
   switch (iAnsType){
 case 6, 7 :
 sAnswer = Replace(sAnswer, ,, |, ALL);
   }
 /cfscript


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



<    3   4   5   6   7   8   9   10   11   12   >