Sure enough. Can you tell I've never used CFOBJECT or CFINVOKE, ever?
I'm curious. Why would you want to type this:
<cfinvoke component="#o#" method="testMethod" returnvariable="r">
<cfinvokeargument ... />
....
</cfinvoke>
as opposed to this:
<cfset r = o.testMethod(
...
) />
I know you hate my "i have lazy fingers" argument, but where's the
downside in this case?
cheers,
barneyb
On Mon, 29 Nov 2004 10:49:44 -0800, Sean Corfield
<[EMAIL PROTECTED]> wrote:
> On Mon, 29 Nov 2004 10:29:26 -0800, Barney Boisvert <[EMAIL PROTECTED]> wrote:
> > CFINVOKE and createObject are very different beasts. CFOBJECT and
> > createObject are the same, but CFINVOKE creates and instance of the
> > CFC, calls the specified method on it, and then lets the instance
> > disappear, with no hope of holding on to it for future reuse.
>
> Unless you specify a component *reference* in <cfinvoke> rather than a
> component name:
>
> <cfset t = createObject("component", "test") />
> <cfinvoke component="#t#" method="testMethod" returnvariable="r" />
> --
> Sean A Corfield -- http://www.corfield.org/
> Team Fusebox -- http://www.fusebox.org/
> Breeze Me! -- http://www.corfield.org/breezeme
> Got Gmail? -- I have 1 invite
>
> "If you're not annoying somebody, you're not really alive."
> -- Margaret Atwood
>
--
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/blog/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:185565
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54