Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
superbullet #1
Using cfscript to invoke components.
I was wondering, if I use cfscript to invoke a coldfusion component, does it reinvoke the entire component when more than 1 method is called?
superbullet Guest
-
Cftry and cfscript..hmmm
I want to catch errors in cfscript as I did with cftags, where the code is inside the cftry and if an error occurs, then the error is supressed, and... -
cfscript
since i cannot find the cf and java integration thread, gues i will post this here: i wrote a cfm with cfscript that utilizes java which connects... -
<cfscript> autocaps problem </cfscript> - betcha can't fix this!
First, I'll tell you up front that I am clueless when it comes to cfscript. So I apologize if this question is off topic. I have a nice little... -
cfscript and variables
I'm using cfscript against a COM object. In VB the paramater is passed like: Set oSegment = oTransactionset.CreateDataSegment('BEG')... -
vbscript to cfscript
I'm trying to assign a value to an object. I have an example in asp that works and I'm trying to get it to work in cfscript. Here's the vbscript: ... -
Stressed_Simon #2
Re: Using cfscript to invoke components.
If you invoke your component as a object then all its public methods will be
available for the rest of the template.
eg.
<cfscript>
// create component object
compObj = CreateObject("component", "myCFC");
// call init method
compObj.init(var1);
// call init method again
compObj.init(var2);
</cfscript>
you can also create objects in the session scope and you can then call methods
from that for the life of the session.
Stressed_Simon Guest
-
superbullet #3
Re: Using cfscript to invoke components.
That was my guess as well. But if you use <cfinvoke> then inorder to call a second method the entire component must be reinvoked right? So cfscript has an advantage.
superbullet Guest
-
mpwoodward *TMM* #4
Re: Using cfscript to invoke components.
On 2005-06-26 15:01:58 -0500, "superbullet"
<webforumsuser@macromedia.com> said:
It's not cfscript that has an advantage so much as using cfobject or> That was my guess as well. But if you use <cfinvoke> then inorder to
> call a second method the entire component must be reinvoked right? So
> cfscript has an advantage.
CreateObject() as opposed to cfinvoke creates the advantage you
describe. You can use cfobject to instantiate your object and then
call multiple methods on it, and this would be more or less the same as
using CreateObject() in cfscript.
Matt
--
Matt Woodward
[email]mpwoodward@gmail.com[/email]
Team Macromedia - ColdFusion
mpwoodward *TMM* Guest
-
superbullet #5
Re: Using cfscript to invoke components.
Yes, that's what I meant. I just always use cfscript, and I forget that <cfobject> tag exists. Well, then that is strange, why did they ever even come up with a <cfinvoke> tag?
superbullet Guest



Reply With Quote

