See.... DOH!! Thanks!
On 11/1/06, Gaulin, Mark <[EMAIL PROTECTED]> wrote: > > It's "returnVariable", not "return" > > -----Original Message----- > From: J W [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 01, 2006 10:00 AM > To: CF-Talk > Subject: Simple CFC question... > > I will probably do the Homer "Doh!!" After I hear the answer.. > > Here is a very simple CFC called mycfc.cfc > > <cfcomponent> > <cffunction name="sayhi" returntype="string"> > <cfset hi = "hi"> > <cfreturn hi> > </cffunction> > </cfcomponent> > > Calling it using cfobject like this: > > <cfobject name="testCFC" component="mycfc"> <cfset answer = > testCFC.sayhi()> <cfoutput>#answer#</cfoutput> > > Outputs "hi" Like its supposed to... > > Now if I try the cfinvoke method I get an undefined variable.. > <cfinvoke > component="mycfc" > method = "sayhi" > return = "returnVar"> > </cfinvoke> > > <cfoutput>#returnVar#</cfoutput> > > Why do I get "Variable RETURNVAR is undefined." instead of "hi"? Its got > to be something stupidly simple, I just got that feeling. > > Thanks > J > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:258736 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4